Check a property write in PCA Script
On this page
PCA 3D ADVENTURE STUDIO 0.86.4.0 / PCA SCRIPT
RUNTIME WALKTHROUGH
Call action_result inside a PCA Script function. Give it the registered action ID and a dictionary of arguments. The function below returns the whole reply to its caller.
function checked() let args = {"entityId":"lamp","property":"light.intensity","value":3.75} return action_result("ChangeObjectProperty", args)end1
Point the function at a real lamp#
In the room you will run, identify a placed 3D light. Use its entity ID in place of lamp. Start its intensity below 3.75. In the script designer for this language, add the function to the selected script, apply, and call it from an existing script event or exposed-function action. For Lua, keep one returned module table.
2
Read both outcomes#
Call once and look for applied. Call again without touching the lamp and look for unchanged. The Lua function returns that text directly. The other three return the reply: first inspect ok, then result.status on success or error and message on failure.
3
Find another call in the current catalog#
The following pages list every built-in action whose contexts include script. Copy the action ID and supply the named dictionary fields. For the three new setters, look up Change2DLayerProperty, ChangeCameraProperty and ChangeRoomProperty under C.
Two different kinds of reference
The earlier language chapters explain syntax, direct helpers and legacy wrappers. The regenerated pages below are the 0.86.4.0 lookup for checked action IDs and registered property paths. The reference window also shows choices, defaults, value limits and project functions.
PCA 3D / PCA Script
