From SRB2 Wiki
Jump to navigation Jump to search

A_CustomPower is an action that gives the target (must be a player) a power-up, and plays SeeSound. The power-up is determined by Var1. Var2 sets the value of the power-up (how much of the power-up the player gets, or the duration). If any of the shield powers are selected using this action, the shield orb for the power given will be automatically spawned if it doesn't already exist on the player.

In SRB2, this action is internally used by linedef type 434, using a dummy MT_NULL Object to call A_CustomPower with the player who triggered it set as the target. Flag [6] / Not Climbable checked on this linedef special will make any timer powers infinite in duration – this is achieved in SOCs or Lua scripts using A_CustomPower by setting Var2 to UINT16_MAX (65535), a special value that prevents timer powers from reducing their values. NUMPOWERS can be used to retrieve the number of powers for Lua.

For the list of available powers, see Powers.

  Actions – Powers and monitors [view]