Skip to reading
Global & Project Settings

GDScript example

Edition 0.86.4.3

0.86.4.3 edition with revised lessons, updated cross-references and new cinematic/camera-safety supplements. Earlier examples, screenshots and registry figures retain their stated edition context.

Download PDFView PDF page
On this page
Source table from GDScript example, page 64
ActionTypical fields
Change Project PropertyA project-data property path and the new value.

Use the dedicated control actions for profile/interaction/input changes. They update the live control system. For example, a cutscene can switch to a particular interaction arrangement and restore the previous one afterward.

Not every stored field is a safe instant runtime change. A rendering-backend switch requires a game/application restart. Use a quality change or a supported presentation/control action when that is the effect you actually need.

Put this inside the entry function provided by the script editor. Keep its template wrapper and parameters. These values match the verified runtime change described above.

Code example
await SetMovementProfile({"profile": "direct"})
await SetInteractionMode({"mode": "verb-single-click"})
await ChangeGameSetting({
    "setting": "masterVolume", "value": 0.4
})

For the existing settings API, GetSetting("renderQuality") reads the value and

SetSetting("renderQuality", "performance") requests a supported quality change. Check return values where the call provides one. Setting a value in a running session does not write your authored project file back to disk.

PCA Script#

Code example
function run()
    SetMovementProfile({"profile": "direct"})
    SetInteractionMode({"mode": "verb-single-click"})
    ChangeGameSetting({"setting": "masterVolume", "value": 0.4})
end

BASIC#

Code example
FUNCTION Run()
    AWAIT SetMovementProfile({"profile": "direct"})
    AWAIT SetInteractionMode({"mode": "verb-single-click"})
    AWAIT ChangeGameSetting({"setting": "masterVolume", "value": 0.4})
END FUNCTION
Page 64 of 70Permalink
Go to page