# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/if-in-verse
# Local doc: epic-docs/documentation/en-us/uefn/if-in-verse.md
# Section: if ... else
var PlayerFallHeight : float = CalculatePlayerFallHeight()
if (PlayerFallHeight < 3.0 and JumpMeter = 100):
# Perform a double jump.
ActivateDoubleJump()
# Reset the player’s fall height.
ZeroPlayerFallHeight()
else:
# Flap the character’s arms to tell the player they
# cannot double jump right now!
ActivateFlapArmsAnimation()
# Set the double-jump cooldown so rapidly pressing Jump does
# not cause the "flap arms" animation to play inappropriately.
SetDoubleJumpCooldown()
Verse Library
verse
03 If Else
Demonstrates standard if-else statements to branch gameplay logic based on player state checks.
extracted-snippets/documentation/en-us/uefn/if-in-verse/03-if-else.verse