EVENT CHECKTOUCHDAMAGE: Difference between revisions
Jump to navigation
Jump to search
Hendricks266 (talk | contribs) Created page with "EVENT_CHECKTOUCHDAMAGE is a Game Event. This event is triggered in P_CheckTouchDamage() whenever the player collides with walls and sprites. The va..." |
Doom64hunter (talk | contribs) m Way more information on how to use the event |
||
Line 1: | Line 1: | ||
{{EventTable|1=EVENT_CHECKTOUCHDAMAGE|2=player touching wall/sprite|3=[[i|player->i]]|4=1 value}} | |||
EVENT_CHECKTOUCHDAMAGE is a [[EDuke32 event list|Game Event]]. | EVENT_CHECKTOUCHDAMAGE is a [[EDuke32 event list|Game Event]]. | ||
This [[event]] is triggered in P_CheckTouchDamage() whenever the player collides with walls and sprites. The value of [[RETURN]] is set to the result provided by [[clipmove]] | This [[event]] is triggered in P_CheckTouchDamage() whenever the player collides with walls and sprites. | ||
The value of [[RETURN]] is set to the result provided by [[clipmove]] and so can be decoded in the same way: | |||
* If player touched a sprite, RETURN = spriteNum + 49152 | |||
* If player touched a wall, RETURN = wallNum + 32768 | |||
Set [[RETURN]] to -1 to prevent hardcoded touch damage effects from occurring. | |||
You can also set [[RETURN]] to that of a different spriteNum / wallNum, to trigger hardcoded effects of that sprite. | |||
The following picnums have hardcoded touch effects: | |||
* 230 (BIGFORCE overwall): Create a forcefield effect and sets [[hurt_delay]] to 26, no damage. | |||
* 663 (W_FORCEFIELD overwall): Deal 5 damage, push player back, create forcefield effect, set [[hurt_delay]] to 16. | |||
* 911 (CACTUS sprite): Subtracts 5 HP on touch and sets [[hurt_delay]] to 16. | |||
[[Category:Events]] | [[Category:Events]] |
Latest revision as of 09:59, 5 February 2022
Event ID | player# | THISACTOR | RETURN | |
---|---|---|---|---|
EVENT_CHECKTOUCHDAMAGE | player touching wall/sprite | player->i | 1 value |
EVENT_CHECKTOUCHDAMAGE is a Game Event.
This event is triggered in P_CheckTouchDamage() whenever the player collides with walls and sprites.
The value of RETURN is set to the result provided by clipmove and so can be decoded in the same way:
- If player touched a sprite, RETURN = spriteNum + 49152
- If player touched a wall, RETURN = wallNum + 32768
Set RETURN to -1 to prevent hardcoded touch damage effects from occurring.
You can also set RETURN to that of a different spriteNum / wallNum, to trigger hardcoded effects of that sprite.
The following picnums have hardcoded touch effects:
- 230 (BIGFORCE overwall): Create a forcefield effect and sets hurt_delay to 26, no damage.
- 663 (W_FORCEFIELD overwall): Deal 5 damage, push player back, create forcefield effect, set hurt_delay to 16.
- 911 (CACTUS sprite): Subtracts 5 HP on touch and sets hurt_delay to 16.