Skip to reading
GDScript Programming & Godot

Say()

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

Say

Speak as the chosen character. With Wait for Continue off, speech uses timed advancement; with it on, the player must continue.

Source table from Say(), page 100
Option key / fieldMeaning and inputDefault
Speaker speakerIdChoose a Character Designer ID; player is a runtime alias where supported.Blank
Text textText.Blank
Wait for Continue waitForContinueWait for the player to continue the speech instead of using timed advancement.false
Voice Audio voiceAssetIdChoose an imported audio asset. May be blank.Blank
Voice Key (optional) voiceKeyOptional localization/voice lookup key.Blank
Typewriter Effect typewriterReveal text progressively instead of displaying it all at once.false
Typing Speed (characters/second) typewriterSpeedText reveal rate in characters per second. Range: 1.0 to 240.0.30.0
Typing Sound typewriterSoundChoose: default, none, custom."default"
Typing Sound Asset typewriterSoundAssetIdThe imported audio used when the typing sound is custom. May be blank.Blank

Timing. Waits for the speech routine; manual continuation is optional.

Code example
await Say({"speakerId": "elias", "text": "The mechanism is ready.", "waitForContinue": false})

In use. Let Elias explain the machine, then run the next instruction. A timed line without a custom duration uses the runtime's short speech timing. Voice and typewriter settings affect presentation; the speaker still needs a valid scene or character definition.

Typing sound: default, none or custom. Custom uses typewriterSoundAssetId; speed is characters per second.

Page 100 of 378Permalink
Go to page