Difference between revisions of "A Lower"

From DoomWiki.org

[checked revision][checked revision]
(add some more detail)
(recategorize)
Line 47: Line 47:
 
* {{DoomSrc|file=p_pspr.c|line=385|text=A_Lower}} in the Doom source code.
 
* {{DoomSrc|file=p_pspr.c|line=385|text=A_Lower}} in the Doom source code.
  
[[Category:Code pointers]]
+
[[Category:Weapon code pointers]]

Revision as of 18:16, 16 March 2020

A_Lower is a code pointer used in the weapon lower animation for all weapons.

A_Lower moves the Y position of the weapon sprite towards the bottom of the screen by a small amount each time it is invoked. If the bottom of the screen is reached, the next weapon is selected and the raise state is invoked to bring it up. A_Lower is usually used in a state that is an infinite loop that repeatedly jumps back to itself; the loop terminates when the weapon has finished lowering.

Uses

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

Example

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

Pointer 21 (Frame 34)
Codep Frame = 82

Or using BEX syntax:

[CODEPTR]
Frame 1234 = Lower

External links