EVENT PREACTORDAMAGE

From EDukeWiki
Jump to navigation Jump to search
Event ID player# THISACTOR RETURN
EVENT_PREACTORDAMAGE closest player to sprite sprite being damaged 1 value

EVENT_PREACTORDAMAGE is a Game Event.

This event is triggered whenever an actor runs ifhitweapon, just before the accumulated damage in htextra is applied to the actor's extra.

RETURN is initially set to 0. If nonzero, damage will not be applied for this run of the damage calculation -- however, htextra will also not be set to -1, meaning that without doing anything else, the next execution of ifhitweapon may still apply the damage.

Altering htextra in this state allows you to change the accumulated damage that is applied to the actor's health.