71. Change a room stack or a caller-owned effect
A room-specific shader configuration belongs to the Scene record. In a GDScript record, its registry proxy can set the same fields used by the Inspector. The active room refreshes its environment/post process when those fields change.
extends PCAScriptBasefunc run() -> void:
Scene.Get("lab").Set(
"environment.postProcessOverrideMode", "custom")
Scene.Get("lab").Set("environment.postProcess", {
"layers":[{"preset":"sepia","intensity":0.6}],
"tintStrength":0.0
})For a caller-owned object, the shared action API also supports this. For example, an event owned by an authored Heat Haze particle can change its own distortion:
await ChangeObjectProperty({"entityId":"this",
"property":"particle.heatDistortion","value":0.0})The caller is captured from the event context. On a GUI event, this identifies the GUI/calling element context, not the brazier. On an object event, it identifies that object. A standalone script test or cutscene test may have no object caller at all.
Use explicit IDs for cross-object operations. “this” is not a universal substitute for “whatever I last selected in the editor.” It belongs to the running event’s caller.
