EVENT DAMAGEWALL

From EDukeWiki
Jump to navigation Jump to search
Event ID player# THISACTOR RETURN
EVENT_DAMAGEWALL -1 Damage Source 2-6 values

EVENT_DAMAGEWALL is a Game Event.

This event is triggered whenever a wall is hit by a weapon, if and only if the tilenum of the wall was defined with damageeventtile and damageeventtilerange.

THISACTOR equals the spriteNum of the projectile or source of damage.

RETURN or the userdef return 0 equals the wallNum of the wall being damaged. This applies to both solid walls, as well as shootable maskwalls.

By setting RETURN to -1, hardcoded wall damage effects will be disabled for the wall in question. This includes effects such as mirrors breaking, forcefield decals appearing, vents being destroyed, glass and lights breaking, etc.

The userdef return 1 through 5 equals the hitradius parameters. If there's no radius damage, return 1 equals -1.

See also EVENT_DAMAGEFLOOR, EVENT_DAMAGECEILING, EVENT_DAMAGESPRITE and EVENT_POSTDAMAGESPRITE.

Return Values

The additional return values of this event are only set if the damage type is RADIUSDAMAGE, i.e. explosive damage. If the damage was not caused by an explosion, only `userdef.return 0` is set, and `userdef.return 1` will be set to -1.

userdef.return 0 (alias RETURN)
Is set to the wallNum of the wall being damaged. Set to -1 to skip hardcoded wall damage effects. Cannot be used to change the destination of the damage.
userdef.return 1
Contains the blast radius if the damage type was radius damage. This value is set to -1 if no radius damage occurred.
userdef.return 2
Contains the damage dealt in the outermost blast radius area. (usually defined to be the lowest)
userdef.return 3
Contains the damage dealt in the second to outermost blast radius area.
userdef.return 4
Contains the damage dealt in the second to innermost blast radius area.
userdef.return 5
Contains the damage dealt in the innermost blast radius area. (usually defined to be the highest)