Skip to reading
PCA Script Programming

Gameplay: Continuous object effects and attachments

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Configure an effect or attach point first, then use these actions to control it. An attach point is a named location on an object, model bone or sprite. Contact watches report proximity between points; they are not a full physics collision system.

toggle_motion()#

Toggle Motion | Action ID: ToggleMotion

Invert an object's authored motion-enabled state, optionally mirroring that state into a variable.

Source table from Gameplay: Continuous object effects and attachments, page 154
Option key / fieldMeaning and accepted inputDefault
Room sceneIdChoose a scene ID.Blank
Object entityIdChoose an entity in the selected scene.Blank
State Variable (optional) variableChoose a game variable name. May be blank.Blank

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
toggle_motion({"sceneId": "lab", "entityId": "archive_door", "variable": "powered"})

In use. Toggle a rotating sign when a switch is used. Configure the object's motion in its inspector first. Repeated events invert the state again; use Set Motion when a specific final state matters.

Page 154 of 357Permalink
Go to page