Skip to reading
Visual Scripting in Depth

51. Start work on room entry or game startup

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
Source table from 51. Start work on room entry or game startup, page 55
RouteUse it for
Room First Enter action listOne-time introduction to that room.
Room Enter action listWork required whenever that room is entered.
On Event: OnSceneLoadedA listener that can inspect sceneId, previousSceneId and firstVisit.
On Event: OnGameStartA game-wide startup response.
Project startup Visual ScriptA selected opening flow before normal player control, when that startup mode is intended.

1. Choose one place for each startup responsibility.

2. For OnSceneLoaded, filter {"$context":"sceneId"} against your room ID.

3. Use {"$context":"firstVisit"} when the distinction matters.

4. For a room action list, add Run Visual Script or Call Script Function as appropriate.

5. Keep initial puzzle values in Variable Designer when they must exist before room-entry work.

6. Test a new game and a later room return separately.

Room loading and game startup are different events. Do not assume an OnGameStart initializer will run before every room-entry action that needs a value. Avoid resetting solved puzzle flags on every room load.

Room and startup calls may have no object owner. A helper that targets this must be called from an appropriate owner event or be rewritten to take an explicit target.

Page 55 of 93Permalink
Go to page