A_WeaponAlert
From DoomWiki.org
A_WeaponAlert is a weapon function that is part of the MBF21 specification. It alerts monsters within sound-travel distance of the player's presence. It can be used to override the effect of the SILENT flag, which stops a weapon from alerting monsters.
Example[edit]
The following is an example of how to set the A_WeaponAlert
code pointer in a DeHackEd file using BEX syntax:
Frame 13 Next frame = 1234 Frame 1234 Next frame = 14 [CODEPTR] FRAME 1234 = WeaponAlert
Or using DECOHack syntax:
state 13 { PISG A 4 goto 1234 } state 1234 { TNT1 A 0 A_WeaponAlert goto 14 }
The example above uses A_WeaponAlert
on an invisible, zero-duration state to alert nearby monsters the moment the pistol is fired (state 14). This assumes that the pistol itself has been given the SILENT flag, since the use of A_WeaponAlert
would otherwise be redundant.
External links[edit]
- A_WeaponAlert in the DSDA-Doom source code, hosted on GitHub.
- MBF21 specification, hosted on GitHub.