A_JumpIf
From ZDoom Wiki
A_JumpIf (expression, int offset)
A_JumpIf (expression, str "state")
Jumps offset amount of states forward, or to the state label state, 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 } }