28. Keep caller identity through nested work
A graph can call another graph or a text function, wait, then continue. The original caller is captured so that this continues to mean the owner that started that chain. Changing an action’s target does not make that target the new caller.
{
"owner": {"$this":"id"},
"name": {"$this":"name"},
"item": {"$context":"itemId"}
}Put that value in Return for a small diagnostic helper. Call it from two different switches and inspect the returned owner and name. Then call it through Call Script from another graph; the original switch identity should remain.
| Reference | Meaning |
|---|---|
| this | Captured event owner for the current call chain. |
| player | The active player alias. |
| An explicit ID | The named entity or record. |
| {"$context":"entityId"} | The entityId field in the call context. |
| {"$param":"target"} | A named function argument, if declared and supplied. |
An ownerless startup event has no this. A scene change does not silently retarget an old call to a new room object. Shared helpers should either require an owner or take an explicit entity parameter.
In GDScript, self continues to mean the script instance. this is PCA’s calling-record reference. They serve different purposes.
