View Full Version : detect hit
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)?
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.
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.
07-23-2011, 03:09 PM
How can I tell whether the Actor from Touch() is a Projectile? Does UDK have something like "instanceof"?
07-23-2011, 05:38 PM
use the class variable or the isa function. these are both in object
pawn.class == class'UTPawn';
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.