Difference between revisions of "A Pain"

From DoomWiki.org

[checked revision][checked revision]
(add some more detail)
(recategorize)
Line 67: Line 67:
 
* {{DoomSrc|file=p_enemy.c|line=1577|text=A_Pain}} in the Doom source code.
 
* {{DoomSrc|file=p_enemy.c|line=1577|text=A_Pain}} in the Doom source code.
  
[[Category:Code pointers]]
+
[[Category:Core monster AI code pointers]]

Revision as of 21:15, 16 March 2020

A_Pain is a code pointer used in the pain animation for the Player and various monsters.

A_Pain just plays the monster's "pain sound" (if it has one). For example, in the case of the player that is DSPLPAIN.

Uses

The A_Pain code pointer appears in the following states in Doom's state table:

Example

The following is an example of how to set the A_Pain code pointer in a Dehacked file:

Pointer 21 (Frame 34)
Codep Frame = 777

Or using BEX syntax:

[CODEPTR]
Frame 1234 = Pain

External links

  • A_Pain in the Doom source code.