Skip to reading
Visual Scripting in Depth

27. Read the event context

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 illustrations

Figure 19. Return can assemble a dictionary from the caller and explicit event fields.

1. Add Read Context after the entry.

2. Set Context Key to entityId.

3. Set Store in Variable to last_target.

4. Call the graph through an object event.

5. Inspect last_target; it should contain that object’s live ID.

Source table from 27. Read the event context, page 31
Context keyCommon source
entityId / verbA scene object interaction.
itemId / amount / operationInventory-change notifications.
guiId / guiElementId / guiEventA GUI element event.
sceneId / previousSceneId / firstVisitOnSceneLoaded.
triggerId / playerIdTrigger entry and exit.
argumentsArguments supplied by a script call.

Context fields depend on the event. Read Context copies the exact field; a missing field produces null. It does not infer a target from whatever the mouse happens to point at.

Choose the key that answers the question. OnInventoryChanged includes the active character and the changed item; read itemId explicitly when you mean the item. The captured caller and an individual context field need not be the same record.

Page 31 of 93Permalink
Go to page