Verse Library verse

08 5 1 Limit Single Line Failable Expressions Count T

Demonstrates Verse's concise if expression with inline assignment for conditional elimination logic.

extracted-snippets/documentation/fortnite/verse-code-style-guide-in-unreal-editor-for-fortnite/08-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 (Damage > 10, Player := FindRandomPlayer[], Player.GetFortCharacter[].IsAlive[]):
EliminatePlayer(Player)

Comments

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