Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

cutscene

Drive the cutscene playing now — put one on screen without waiting for whatever would have triggered it, land on an exact moment inside it, freeze it while you work on the frame, and read where its clock is.

A cutscene is written to be watched from its start, which is the whole reason this toolbox exists: reaching the shot at 0:48 by watching costs 48 seconds every iteration, and cutscene.seek 48 puts it on screen in one call.

The loop this is for

cutscene.play   mygame.scenes.intro     -- put it on screen
cutscene.seek   6.5                     -- land on the shot you are working on
cutscene.pause                          -- stop the clock and the scene; the frame stays put
… edit the cutscene module via the VFS …
cutscene.play   mygame.scenes.intro     -- play it again on the edit
capture                                 -- look at the result

cutscene.rate 0.25 runs a fast move slowly enough to read; cutscene.rate -1 runs it backwards.

The tools

ToolWhat it does
play <module> [paused]Play a cutscene from the module its definition is returned from.
statusName, clock, shot, progress, paused, rate.
seek <t>Land on an exact moment. The frame is re-derived, not fast-forwarded to.
pause / resumeFreeze the clock and start it again.
rate <r>1 real time, 0.25 slow motion, -1 backwards.
skipSkip to the closing fade, the way a player does. Cues past here still fire.
stopEnd it and give back the camera, the overlay and the player's controls.

Reaches the cutscene you are watching

The clock belongs to whichever scope started the cutscene — a scene entrypoint, a CutsceneTrigger, an execute. These tools reach it through engine state rather than through a module handle, so cutscene.pause freezes the cutscene on your screen rather than a private copy of it.

Requires play mode

A cutscene runs in play. In edit there is no clock to drive, and every tool here says so rather than pretending it moved something.