DamageThing


Damages a thing. Remember that the damaged message in the thing's class and capture cogs may change the damage amount. Syntax:

undamage=DamageThing(thing, damage, flags, damager);

undamage: This is the amount of damage that was not applied to the thing.

damage: This is the amout of health to subtract from the thing. This becomes the first parameter of the damaged message.

flags: This is the Damage Flag for the damage. This tells the engine and the damaged message the type of the damage. This flag becomes the second parameter of the damaged message.

damager: This is the thing that caused the damage. This thing becomes the source of the damaged message.


Aside from the class and capture cogs, the 0x10 Inventory Flag will make the local player's damaged message run in an items.dat cog.