Skip to content

Field manual / Level editor

scene — Scenes and video

Everything that plays "like a movie": scenes, dialogs, video, fades, the caption.

Summary

scene::StartImmediately starts the scene (scriptlet) with this name.
scene::StartNextIf a scene is playing, queues this scene after it (replacing one already queued); otherwise starts it immediately.
scene::DialogShows the whole dialog, line by line: scene::Dialog(~d"lab-after_teleport") is a dialog block of the project (the build checks that it exists).
scene::PlayVideoPlays a video (for example, before a boss fight) at screen position (x, y); double 1 shows it at double size.
scene::SignatureShows the date caption (a frame of intro.spr) at the bottom of the screen; -1 removes it.
scene::FadeInFades the screen in from black.

Functions

scene::Start(scene) → int

Classic: StartScriptlet

Immediately starts the scene (scriptlet) with this name.

scene::StartNext(scene) → int

Classic: SetAddonScriptlet

If a scene is playing, queues this scene after it (replacing one already queued); otherwise starts it immediately.

scene::Dialog(dialog) → int

Classic: DialogInit

Shows the whole dialog, line by line: scene::Dialog(~d"lab-after_teleport") is a dialog block of the project (the build checks that it exists). Classic writes DialogInit("name", "file.dlg"); nobody reads the name, and OG Script does not have it. A level's own dialog is scene::Dialog(host.dialog), the dialog field of its block (for a battle, the pre-fight dialog, StartDialog()).

scene::PlayVideo(string, int, int, int) → int

Classic: AVI_Play

Plays a video (for example, before a boss fight) at screen position (x, y); double 1 shows it at double size.

scene::Signature(int) → int

Classic: Signature

Shows the date caption (a frame of intro.spr) at the bottom of the screen; -1 removes it.

scene::FadeIn() → int

Classic: FadeIn

Fades the screen in from black. After level::Load it acts on the new level.