From Unreal Wiki, The Unreal Engine Documentation Site
< User:Wormbo
Revision as of 08:49, 18 November 2009 by imported>Wormbo (not just UT2004)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
UE2 Object >> Actor >> Mover >> DamageTriggerMover (custom)

This Mover subclass replaces the logic for damage-triggering the mover with the ability to trigger a generic event when the mover is damaged.


Property group 'Mover' (redefined from Mover)


Type: bool

Not used.


Type: float

Minimum amount of damage required to trigger the event.

Property group 'MoverEvents'


Type: name

This event will be triggered when the mover is damaged.


Download and extract it to your UT2004\System directory. Either load DamageTriggerMover.u in the Actor Browser or add DamageTriggerMover to your EditPackages list. You will be able to place this type of mover by right-clicking the mover icon in the UnrealEd toolbox.

The other way is manually creating a subclass of Mover in myLevel and compiling the following code, which should be compatible with almost all Unreal Engine 2 games. <uscript> class DamageTriggerMover extends Mover;

//============================================================================= // Variables //=============================================================================

var(MoverEvents) name DamageEvent; var() const editconst string Build;

/** Called when the mover takes damage. (duh...)

  • /

event TakeDamage(int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType) {

 if (Damage >= DamageThreshold)
   TriggerEvent(DamageEvent, Self, EventInstigator);

} </uscript>