A_Raise

From ZDoom Wiki
Jump to: navigation, search

A_Raise

(no parameters)


This function must be called in a weapon's “Select” state sequence. It should not be used anywhere else. It is responsible for raising the weapon and for entering the ready state sequence when it is done.

Each time A_Raise is called, the weapon moves further up the screen as it approaches the ready position. You can therefore make a weapon raise faster than the default by calling A_Raise more than once within the same tic.

Note: This function should not be confused with the A_Raise[Actor] functions.

Examples

Here is an example of a basic “Select” state that makes use of A_Raise to bring the weapon up to the ready position:

Select:
   SHTG A 1 A_Raise
   loop

This will raise the shotgun up from the bottom of the screen when it is selected. Once the shotgun has reached the ready position, A_Raise will automatically jump to the “Ready” state.

This gun raises into view twice as fast as normal:

Select:
   FAST A 0 A_Raise // The 0-tic delay means this will execute within the same tic as the next line
   FAST A 1 A_Raise
   loop

See Also