A_JumpIf

From ZDoom Wiki
Jump to: navigation, search

A_JumpIf (expression, int offset)
A_JumpIf (expression, str "state")

Jumps the specified amount of states forward if expression evaluates to true. See DECORATE expressions for more information on expressions.

Examples

Example of a projectile that “fizzles out” if it enters water:

actor FizzleBall : DoomImpBall
{  
  states
  {
  Spawn:
    BAL1 AB 4 bright
    BAL1 A 0 A_JumpIf(waterlevel == 2, "DeepWater")
    loop
  DeepWater:
    BAL1 A 0 A_PlaySound("Fizzle")
    FIZZ ABC 6
    stop
  }
}
Personal tools
Namespaces
Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox