A_SPosAttack
From DoomWiki.org
A_SPosAttack is a code pointer used in the attack animation for the shotgun guy (a.k.a. sergeant) and spiderdemon.
A_SPosAttack
implements the sergeant's shotgun attack, and is therefore similar to the A_FireShotgun code pointer used for the player weapon animations. Unlike that function though, A_SPosAttack
fires only three pellets. Internally it calls A_FaceTarget and the DSSHOTGN sound effect is played.
Uses[edit]
The A_SPosAttack
code pointer appears in the following states in Doom's state table:
Frame number | Doom internal name | Use |
---|---|---|
218 | S_SPOS_ATK2 | attack animation for the shotgun guy |
616 | S_SPID_ATK2 | attack animation for the spiderdemon |
617 | S_SPID_ATK3 | attack animation for the spiderdemon |
Example[edit]
The following is an example of how to set the A_SPosAttack
code pointer in a DeHackEd file:
Pointer 21 (Frame 34) Codep Frame = 617
Or using BEX syntax:
[CODEPTR] Frame 1234 = SPosAttack
Code structure[edit]
The code structure for A_SPosAttack
is almost identical to that of A_PosAttack.
See also[edit]
- A_FireShotgun - player weapon equivalent
External links[edit]
- A_SPosAttack in the Doom source code.
- A_SPosAttack at the ZDoom wiki
- SPosAttack at the Eternity Engine wiki