EVENT CHECKFLOORDAMAGE: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Created page with "EVENT_CHECKFLOORDAMAGE is a Game Event. This event is triggered in P_CheckFloorDamage(). RETURN is simply the picnum of the floor of the sector..."
 
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{EventTable|1=EVENT_CHECKFLOORDAMAGE|2=player standing on floor|3=[[i|player->i]]|4=1 value}}
EVENT_CHECKFLOORDAMAGE is a [[EDuke32 event list|Game Event]].
EVENT_CHECKFLOORDAMAGE is a [[EDuke32 event list|Game Event]].


This [[event]] is triggered in P_CheckFloorDamage(). [[RETURN]] is simply the picnum of the floor of the sector the player is in. It can be used to cancel hard coded floor damage effects or to make other tiles exhibit the same effects.
This [[event]] is triggered whenever the player is standing on a floor that isn't a sprite bridge. (i.e. in <code>P_CheckFloorDamage()</code>).
 
[[RETURN]] is set to the picnum of the floor the player is standing on.
 
If [[RETURN]] is set to -1, hardcoded effects ('''excluding tile 4240, i.e. PURPLELAVA''') that damaging floors would normally cause are cancelled.
 
By setting [[RETURN]] to one of the following numbers, it is possible to make other floor sprites exhibit the same damaging properties as the corresponding hardcoded tiles:
* 200 ('''FLOORSLIME''') - 6.25% chance each tic of 1-4 damage. Causes a green screen overlay when taking damage as well as pain sounds. (DUKE_LONGTERM_PAIN)
* 859 ('''HURTRAIL''') - 12.5% chance each tic of 1-4 damage. Causes a white screen overlay accompanied by electrical noises and pain sounds. (SHORT_CIRCUIT & DUKE_LONGTERM_PAIN). Note that it is not possible to prevent or replicate the effect that takes all player weapons away if player starts on this picnum.
* 1082 ('''FLOORPLASMA''') - 6.25% chance each tic of 1-4 damage. Causes a reddish-orange screen overlay when taking damage as well as pain sounds. (DUKE_LONGTERM_PAIN)
 
The purple lava tile is not included, as this floor type damages the player while in the air as well.
 
Note that setting the damaging floor property also makes the player use his boots inventory item as protection. Setting [[RETURN]] to -1 causes the player not to use up any boots.


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

Latest revision as of 10:00, 5 February 2022

Event ID player# THISACTOR RETURN
EVENT_CHECKFLOORDAMAGE player standing on floor player->i 1 value

EVENT_CHECKFLOORDAMAGE is a Game Event.

This event is triggered whenever the player is standing on a floor that isn't a sprite bridge. (i.e. in P_CheckFloorDamage()).

RETURN is set to the picnum of the floor the player is standing on.

If RETURN is set to -1, hardcoded effects (excluding tile 4240, i.e. PURPLELAVA) that damaging floors would normally cause are cancelled.

By setting RETURN to one of the following numbers, it is possible to make other floor sprites exhibit the same damaging properties as the corresponding hardcoded tiles:

  • 200 (FLOORSLIME) - 6.25% chance each tic of 1-4 damage. Causes a green screen overlay when taking damage as well as pain sounds. (DUKE_LONGTERM_PAIN)
  • 859 (HURTRAIL) - 12.5% chance each tic of 1-4 damage. Causes a white screen overlay accompanied by electrical noises and pain sounds. (SHORT_CIRCUIT & DUKE_LONGTERM_PAIN). Note that it is not possible to prevent or replicate the effect that takes all player weapons away if player starts on this picnum.
  • 1082 (FLOORPLASMA) - 6.25% chance each tic of 1-4 damage. Causes a reddish-orange screen overlay when taking damage as well as pain sounds. (DUKE_LONGTERM_PAIN)

The purple lava tile is not included, as this floor type damages the player while in the air as well.

Note that setting the damaging floor property also makes the player use his boots inventory item as protection. Setting RETURN to -1 causes the player not to use up any boots.