Verse Library verse

01 Getfirstplayer

Retrieves the first connected player from the current playspace safely.

extracted-snippets/documentation/fortnite/verse-start-05-refactor-and-refine-in-fortnite/01-getfirstplayer.verse

# Source URL: https://dev.epicgames.com/documentation/fortnite/verse-start-05-refactor-and-refine-in-fortnite
# Local doc:  epic-docs/documentation/fortnite/verse-start-05-refactor-and-refine-in-fortnite.md
# Section:    GetFirstPlayer()
# Returns the first player in the playspace.
GetFirstPlayer()<decides><transacts>:player=
return GetPlayspace().GetPlayers()[0]

Comments

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