PDA

View Full Version : detect hit



Shivan Hunter
07-23-2011, 12:38 AM
I have a subclass of DynamicSMActor. How would I tell when it's shot at with a hitscan weapon (or any weapon, whichever is simplest)?

lovindadonks
07-23-2011, 01:10 AM
You could probably either use the touch event or the bump event and check to see if it was this weapon's projectile that hit it.

he3117
07-23-2011, 02:11 AM
if you set collision type of your actor to blockAll or BlocKWeapons You should get "takeDamage" in your actor.

Shivan Hunter
07-23-2011, 03:09 PM
Thanks!

How can I tell whether the Actor from Touch() is a Projectile? Does UDK have something like "instanceof"?

Object
07-23-2011, 05:38 PM
use the class variable or the isa function. these are both in object

ie:
pawn.isa('UTPawn');
or
pawn.class == class'UTPawn';