Difference between revisions of "A Lower"

From DoomWiki.org

[checked revision][checked revision]
(Adding new page for code pointer)
 
(add some more detail)
Line 1: Line 1:
 
{{DISPLAYTITLE:A_Lower}}
 
{{DISPLAYTITLE:A_Lower}}
{{stub}}
 
 
'''A_Lower''' is a [[code pointer]] used in the weapon lower animation for all weapons.
 
'''A_Lower''' is a [[code pointer]] used in the weapon lower animation for all weapons.
 +
 +
<code>A_Lower</code> 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. <code>A_Lower</code> 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 ==
 
== Uses ==

Revision as of 17:53, 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