A_GunFlashTo
From DoomWiki.org
A_GunFlashTo(state, nothirdperson) is a generic weapon muzzle flash function that is part of the MBF21 specification. It has two parameters, using the values provided in the "Args1" and "Args2" fields as arguments. Unlike Doom's native A_GunFlash, this function allows the use of more than one muzzle flash sequence per weapon.
The first argument specifies the state number of the (first) muzzle flash sprite to be displayed, while the second argument takes a boolean value and if non-zero, will not switch the third-person player sprite to its muzzle flash sprite during firing.
Example[edit]
The following is an example of how to set the A_GunFlashTo
code pointer in a DeHackEd file using BEX syntax:
Frame 1234 Next frame = 1235 Args1 = 1236 Args2 = 0 [CODEPTR] FRAME 1234 = GunFlashTo
Or using DECOHack syntax:
state 1234 { TNT1 A 0 A_GunFlashTo(1236, 0) goto 1235 }
External links[edit]
- A_GunFlashTo in the DSDA-Doom source code, hosted on GitHub.
- MBF21 specification, hosted on GitHub.