Skip to reading
GDScript Programming & Godot

Gameplay: Control profiles, verbs and pointer behavior

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
On this page

These commands affect how the player operates the game. Movement profile, interaction mode, input device and visibility of the pointer are separate settings. Provide a way back when an experiment changes the controls.

SetRuntimeControlsEnabled()#

Set Runtime Controls Enabled

Enable or disable the runtime control-profile system.

Source table from Gameplay: Control profiles, verbs and pointer behavior, page 189
Option key / fieldMeaning and inputDefault
Enabled enabledExplicit on/off state for the feature or response.true

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

Code example
await SetRuntimeControlsEnabled({"enabled": true})

In use. Enable the newer adaptive controls for a sequence that uses device switching. Disabling the profile system is not identical to Set Player Input Enabled false; it changes which control machinery is in use.

SetMovementProfile()#

Set Movement Profile

Choose legacy, point-and-click, direct, first-person or drag-to-move movement.

Source table from Gameplay: Control profiles, verbs and pointer behavior, page 189
Option key / fieldMeaning and inputDefault
Movement Profile profileChoose: legacy, point-and-click, direct, first-person, drag-to-move."point-and-click"

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

Code example
await SetMovementProfile({"profile": "point-and-click"})

In use. Switch to direct movement for a short action scene and restore point-and-click afterward. Navigation, camera and input mappings still need to suit the chosen profile.

Page 189 of 378Permalink
Go to page