Skip to reading
GDScript Programming & Godot

ShowMessage()

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

Show Message

Display narration or a short message for a duration, optionally blocking player input.

Source table from ShowMessage(), page 99
Option key / fieldMeaning and inputDefault
Text textText.Blank
Duration (seconds) durationTime in seconds for this action. Read its timing note before assuming it waits.1.8
Block Player Input blockInputBlock normal player input while the message is presented.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 message routine.

Code example
await ShowMessage({"text": "The mechanism is ready.", "duration": 1, "blockInput": false})

In use. Show "The signal is on." for 2.2 seconds. Block Player Input affects movement/interaction while the message is up; the action call itself still waits for the message routine. Keep long conversations in the Dialogue Designer.

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

Page 99 of 378Permalink
Go to page