Field manual / Level editor
scene — Scenes and video
Everything that plays "like a movie": scenes, dialogs, video, fades, the caption.
Summary
scene::Start | Immediately starts the scene (scriptlet) with this name. |
scene::StartNext | If a scene is playing, queues this scene after it (replacing one already queued); otherwise starts it immediately. |
scene::Dialog | 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). |
scene::PlayVideo | Plays a video (for example, before a boss fight) at screen position (x, y); double 1 shows it at double size. |
scene::Signature | Shows the date caption (a frame of intro.spr) at the bottom of the screen; -1 removes it. |
scene::FadeIn | Fades the screen in from black. |
Functions
scene::Start(scene) → int
Immediately starts the scene (scriptlet) with this name.
scene::StartNext(scene) → int
If a scene is playing, queues this scene after it (replacing one already queued); otherwise starts it immediately.
scene::Dialog(dialog) → int
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
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
Shows the date caption (a frame of intro.spr) at the bottom of the screen; -1 removes it.
scene::FadeIn() → int
Fades the screen in from black. After level::Load it acts on the new level.