Verse Library verse

03 Device

Allows precise timeline manipulation including scrubbing, speed adjustment, pausing, and snapping to the final frame.

verse-library/verse-skel-director-control/03-device.verse

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

# THE DIRECTOR'S CHAIR — scrub, speed, and snap a cinematic from Verse.
#
# Part 2 played a sequence start-to-finish. A real director does more: a slow-mo
# replay, an instant skip to the climax, a freeze-frame. The Cinematic Sequence
# device exposes its whole timeline to Verse:
#
#   SetPlayRate(r)        speed dial. 1.0 = normal, 0.5 = slow-mo, 2.0 = fast,
#                         and a NEGATIVE rate plays backward.
#   SetPlaybackTime(s)    teleport the playhead to s seconds.
#   GetPlaybackTime()     read the playhead's current second.
#   TogglePause()         flip play <-> pause without losing position.
#   GoToEndAndStop()      snap to the final frame and stop.
#
# This device wires four buttons to four "director" moves over one sequence —
# a replay-room control panel you can drop into any island. The Cinematic
# Sequence device is set to *Everyone*, so the no-agent calls below work.
cine_director_device := class(creative_device):

    @editable
    Cine : cinematic_sequence_device = cinematic_sequence_device{}

    # Slow-mo replay from the very start.
    @editable
    SlowMoButton : button_device = button_device{}

    # Freeze / unfreeze on the current frame.

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