Verse Library verse

03 Device

Controls playback of a Fortnite Level Sequence, providing play, rewind, and completion event handling for authoring cinematic scenes.

verse-library/verse-skel-cinematic-sequence/03-device.verse

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

# LIGHTS, CAMERA, VERSE — play a cinematic sequence from code.
#
# A Cinematic Sequence device wraps a Level Sequence you author in Sequencer:
# moving cameras, animated doors, lights flaring, a boss rising from the floor.
# Verse doesn't author the keyframes — it drives the TRANSPORT: roll it forward,
# roll it back, stop it, and react the instant it finishes.
#
# This device gives players a "play" button and a "rewind" button for a sequence,
# and uses StoppedEvent to do something the moment the show is over (here: open a
# door). The Cinematic Sequence device must be set to *Everyone* for the no-agent
# Play()/PlayReverse() calls used below.
cine_player_device := class(creative_device):

    # The Level Sequence to drive. Author it in Sequencer, then drop it here.
    @editable
    Cine : cinematic_sequence_device = cinematic_sequence_device{}

    # Rolls the sequence forward.
    @editable
    PlayButton : button_device = button_device{}

    # Rolls the sequence backward (a clean rewind, no editor work needed).
    @editable
    RewindButton : button_device = button_device{}

    # Plays a fanfare when the sequence finishes — the payoff of the cinematic.

Sign in free to read the full source 🌴

This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.

Sign in with Discord

Comments

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