Verse Library verse

10 5 1 Limit Single Line Failable Expressions Count T

Shows the structured if-then syntax for executing code blocks based on boolean conditions in Verse.

extracted-snippets/documentation/fortnite/verse-code-style-guide-in-unreal-editor-for-fortnite/10-5-1-limit-single-line-failable-expressions-count-t.verse

# Source URL: https://dev.epicgames.com/documentation/fortnite/verse-code-style-guide-in-unreal-editor-for-fortnite
# Local doc:  epic-docs/documentation/fortnite/verse-code-style-guide-in-unreal-editor-for-fortnite.md
# Section:    5.1 Limit single line Failable Expressions count to three
if:
Player := FindRandomPlayer[]
IsAlive[Player]
not IsInvulnerable[Player]
Character := Player.GetFortCharacter[]
Character.GetHealth < 10
then:
EliminatePlayer(Player)

Comments

    Sign in to vote, comment, or suggest an edit. Sign in