Skip to reading
GDScript Programming & Godot

SetMotion()

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

Set Motion

Explicitly enable or disable authored object motion.

Source table from SetMotion(), page 162
Option key / fieldMeaning and inputDefault
Room sceneIdChoose a scene ID.Blank
Object entityIdChoose an entity in the selected scene.Blank
Enabled enabledExplicit on/off state for the feature or response.true
State Variable (optional) variableChoose a game variable name. May be blank.Blank

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await SetMotion({"sceneId": "lab", "entityId": "archive_door", "enabled": true})

In use. Start the clock's rotating mechanism after power is restored. Choose Enabled on for a repeat-safe command. This does not create the rotation path, speed or scaling motion; it controls the setup already present on the object.

ToggleGlow()#

Toggle Glow

Invert an object's authored glow state and optionally record it in a variable.

Source table from SetMotion(), page 162
Option key / fieldMeaning and inputDefault
Entity entityIdChoose a scene entity ID.Blank
Variable variableText.Blank

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await ToggleGlow({"entityId": "archive_door", "variable": ""})

In use. Toggle a test lamp during inspection. Visible bloom also depends on renderer/environment support. A bright material without bloom is still emissive; glow is not a mirror reflection of the player.

Page 162 of 378Permalink
Go to page