SetDamage
Jump to navigation
Jump to search
void SetDamage (int dmg)
Usage
Sets the damage of the actor to the specified value. If the actor has its damage set up as an expression, it is changed to a single value (the value being what is eventually set by the function), and in which case, the actor's damage is randomized like normal. It is not possible to combine this function with DamageFunction.
Examples
This plasma projectile's damage increases as it moves along.
class CustomPlasmaBall : PlasmaBall { int user_dmg; Default { Damage 0; } States { Spawn: PLSS AB 6 Bright NoDelay SetDamage(++user_dmg); Loop; } }