Skip to reading
Action Lists & Events

Shared script events: the full reference

Edition 0.86.4.3

0.86.4.3 edition with revised lessons, updated cross-references and new cinematic/camera-safety supplements. Earlier examples, screenshots and registry figures retain their stated edition context.

Download PDFView PDF page
On this page

The GDScript, PCA Script, Lua and BASIC script editors expose 18 shared subscription names. A handler runs because the script is subscribed or because a dedicated hook explicitly calls it; writing a similarly named function alone is not a universal subscription.

The payload lists below describe the standard emitters in this build. A context is a dictionary of information supplied by the caller, not a fixed global object. Local actions, inherited calls and language-specific initialization can add or omit keys.

The visual On Event picker exposes 15 of these names. Video and music have dedicated graph entry nodes; Global Ready belongs to script initialization. Read the media and ready entries before assuming identical support on every surface.

OnGameStart#

GDScript handler: on_game_start(event: Dictionary = {})

The runtime reaches its game-start hook. It is a game-session event, not a once-per-room event.

Source table from Shared script events: the full reference, page 43
Standard contextPractical use / limits
sceneId, playerIdInitialize session-level logic here. Do not reset saved puzzle variables on every scene entry. A direct Test Scene can start a test session too; test a normal new game and a loaded game separately.

OnSceneLoaded#

GDScript handler: on_scene_loaded(event: Dictionary = {})

A room has been constructed and its local entry actions have run.

Source table from Shared script events: the full reference, page 43
Standard contextPractical use / limits
sceneId, previousSceneId, playerId, firstVisitFilter sceneId before changing room-specific props. In the normal entry path, firstEnter runs before enter, then this event is emitted. It is not a substitute for the room's first-time event.
Page 43 of 189Permalink
Go to page