TrapUpdate
Revision as of 10:33, 15 January 2011 by imported>Scruggs (fTrapDeathPushBack, fLevelledDamage)
Syntax:
TrapUpdate
Special function which allows traps to deal damage.
For a trap to deal damage, the following variables need to be defined in its script:
float | fTrapDamage | Amount of damage to do each time the trap affects an actor. |
float | fTrapPushBack | Amount of push back force to apply each time a trap effects an actor. This should range from 0 to 1000. |
float | fTrapDeathPushBack | Presumably when the trap kills the actor, either adds to fTrapPushBack or is used in its place. Not seen used in game scripts, but game code does check for it. |
float | fTrapMinVelocity | Minimum velocity a trap must be moving at relative to the actor to do damage (combination of actor and traps respective velocities). This value is in BSUnits (128 = 6ft). |
float | bTrapContinuous | 0 = Only deal damage on first contact with trap. 1 = Continously subtract damage as long as actor is in contact with trap. |
float | fLevelledDamage | Amount of additional damage to do per level of the actor.
The total damage done by the trap is equal to: fLevelledDamage * actorLevel + fTrapDamage |
TrapUpdate can be put in a GameMode block; everytime it's called it checks whether any actor is in contact with the trap and takes care of the damage, as defined by the above variables.