EVENT DAMAGEHPLANE: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Fox (talk | contribs)
No edit summary
m Remove misinformation, reword the article, and add the template
 
Line 1: Line 1:
{{Deprecated}}
{{Deprecated}}
{{EventTable|1=EVENT_DAMAGEHPLANE|2=-1|3=-1|4=1 value}}


'''EVENT_DAMAGEHPLANE''' is a [[EDuke32_event_list|Game Event]].
'''EVENT_DAMAGEHPLANE''' is a [[EDuke32_event_list|Game Event]].


This [[event]] is triggered whenever a floor or ceiling is hit by a weapon. Note that kicks don't trigger this event nor does the radius damage of the devastator.
This [[event]] is triggered whenever a floor or ceiling is damaged by a projectile or radius damage, regardless of the tile used for the ceiling or floor.
 
[[RETURN]] stores the sectnum that was hit, with an added offset to distinguish floor and ceiling.
* When a ceiling is hit, [[RETURN]] stores the sectnum + 65536.
* When a floor is hit, [[RETURN]] stores the sectnum + 131072.


The number of the sector that was hit is stored in [[RETURN]]. When a floor is hit 131072 is added to [[RETURN]] and when a ceiling is hit 65536 is added to [[RETURN]].
In addition, [[vm.playerDist]] is set to the same value as [[RETURN]] before the event is run. This affects commands such as [[ifpdistl]], hence you may observe unexpected results if player-distance reliant commands are used inside this event.  


You can make pieces of glass fall down from the ceiling by setting [[RETURN]] to 1048576, this will also play the GLASS_BREAKING sound (this does not change the [[ceilingpicnum]], you still have to do this yourself).
Setting [[RETURN]] to 1048576 will replicate the hardcoded glass breaking effect when a ceiling is damaged. In effect, this makes pieces of glass fall down from the ceiling, and play the GLASS_BREAKING sound. Note that this does not change the [[ceilingpicnum]], this needs to be done manually inside the event.


This event is deprecated, use [[EVENT_DAMAGEFLOOR]] and [[EVENT_DAMAGECEILING]] instead.
This event is deprecated, use [[EVENT_DAMAGEFLOOR]] and [[EVENT_DAMAGECEILING]] instead.


[[Category:Events]]
[[Category:Events]]

Latest revision as of 04:14, 4 February 2022

This feature is deprecated.
It's recommend not to use this feature.
Event ID player# THISACTOR RETURN
EVENT_DAMAGEHPLANE -1 -1 1 value

EVENT_DAMAGEHPLANE is a Game Event.

This event is triggered whenever a floor or ceiling is damaged by a projectile or radius damage, regardless of the tile used for the ceiling or floor.

RETURN stores the sectnum that was hit, with an added offset to distinguish floor and ceiling.

  • When a ceiling is hit, RETURN stores the sectnum + 65536.
  • When a floor is hit, RETURN stores the sectnum + 131072.

In addition, vm.playerDist is set to the same value as RETURN before the event is run. This affects commands such as ifpdistl, hence you may observe unexpected results if player-distance reliant commands are used inside this event.

Setting RETURN to 1048576 will replicate the hardcoded glass breaking effect when a ceiling is damaged. In effect, this makes pieces of glass fall down from the ceiling, and play the GLASS_BREAKING sound. Note that this does not change the ceilingpicnum, this needs to be done manually inside the event.

This event is deprecated, use EVENT_DAMAGEFLOOR and EVENT_DAMAGECEILING instead.