23. Self, this and the player
func run() -> bool:
if this == null:
Warn("This interaction needs a caller.")
return false
Log("Caller ID: " + str(this.Get("id", "")))
return trueself is the Godot script instance. this is PCA’s caller proxy when a caller is available. player is the active character’s PCA record proxy, refreshed at the start of a call. None of these automatically means the selected editor object.
A proxy describes a PCA record and routes supported changes. It is not the rendered Node3D. Adding a Timer to self creates a Godot child of the script. Changing this.visible addresses the caller’s record/runtime route instead.
A nested call normally preserves caller context. A direct Run or a global event may have no caller, so reusable interaction code must tolerate null. If the active player can change during an awaited sequence, capture the intended character ID before waiting.
