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. @editable FreezeButton : button_device = button_device{} # Skip straight to the ending. @editable SkipButton : button_device = button_device{} # Print where the playhead currently sits. @editable InspectButton : button_device = button_device{} OnBegin() : void = SlowMoButton.InteractedWithEvent.Subscribe(OnSlowMo) FreezeButton.InteractedWithEvent.Subscribe(OnFreeze) SkipButton.InteractedWithEvent.Subscribe(OnSkip) InspectButton.InteractedWithEvent.Subscribe(OnInspect) # Rewind to the start, set half speed, and roll: a cinematic slow-mo replay. OnSlowMo(Presser : agent) : void = Cine.SetPlaybackTime(0.0) # back to frame zero Cine.SetPlayRate(0.5) # half speed = slow motion Cine.Play() Print("Director: slow-mo replay from the top") # TogglePause flips between playing and paused, keeping the playhead exactly # where it is — a clean freeze-frame, then resume. OnFreeze(Presser : agent) : void = Cine.TogglePause() Print("Director: toggled freeze-frame") # Jump straight to the payoff. GoToEndAndStop snaps to the final frame and # stops (and, as Part 2 showed, fires StoppedEvent). OnSkip(Presser : agent) : void = Cine.GoToEndAndStop() Print("Director: skipped to the ending") # Read the live playhead position — handy for syncing other systems to the # cinematic (e.g. "when the camera is past 4s, spawn the boss"). OnInspect(Presser : agent) : void = Now := Cine.GetPlaybackTime() Rate := Cine.GetPlayRate() Print("Director: playhead at {Now}s, rate {Rate}x")