Verse Library verse

11 Triggering The Sequence

Starts the main performance sequence or returns viewers to TV mode when a player sits.

extracted-snippets/documentation/fortnite/verse-standup-comedy-club-template-in-unreal-editor-for-fortnite/11-triggering-the-sequence.verse

# Source URL: https://dev.epicgames.com/documentation/fortnite/verse-standup-comedy-club-template-in-unreal-editor-for-fortnite
# Local doc:  epic-docs/documentation/fortnite/verse-standup-comedy-club-template-in-unreal-editor-for-fortnite.md
# Section:    Triggering the Sequence
# This function handles the player sitting down and starting up the performance if it isn't already running and setting up the input triggers.
OnSeated(Agent:agent):void =
Logger.Print("Player sat down")
# If the main sequence is not playing on the character device in the level, run it, otherwise if it is running then just return to the TV mode viewing experience.
if (MainSequencePlaying = false):
spawn{RunSequence(Agent)}
else:
DoReturnToTVMode(Agent)

Comments

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