DialogueLabel
Use this in your custom balloon to display the dialogue text. It handles typing out the text, pauses, speeds, inline mutations, etc.
[!NOTE] When adding nodes from the "Add Child Node" button Godot will attach the GDScript version of the node which is fine for most cases. If you specifically need the C# version then you'll have to attach the script manually.
Signals
spoke
signal spoke(letter: String, letter_index: int, speed: float)[Signal] public delegate void SpokeEventHandler(string letter, int letterIndex, float speed);Emitted each step while typing out.
started_typing
signal started_typing()[Signal] public delegate void StartedTypingEventHandler();Emitted when the label starts typing.
skipped_typing
signal skipped_typing()[Signal] public delegate void SkippedTypingEventHandler();Emitted when the player skips the label typing out.
finished_typing
signal finished_typing()[Signal] public delegate void FinishedTypingEventHandler();Emitted when the label finishes typing.
Properties
seconds_per_step
@export var seconds_per_step: float = 0.02[Export] public float SecondsPerStep = 0.02f;The speed at which the text types out.
pause_at_characters
@export var pause_at_characters: String = ".?!"[Export] public string PauseAtCharacters = ".?!";Automatically have a brief pause when these characters are encountered.
skip_pause_at_character_if_followed_by
@export var skip_pause_at_character_if_followed_by: String = ")\""[Export] public string SkipPauseAtCharacterIfFollowedBy = ")\"";Ignore automatic pausing if the pause character is followed by one of these.
skip_pause_at_abbreviations
@export var skip_pause_at_abbreviations: Array = ["Mr", "Mrs", "Ms", "Dr", "etc", "ex"][Export] public string[] SkipPauseAtAbbreviations = ["Mr", "Mrs", "Ms", "Dr", "etc", "eg", "ex"];Don't auto pause after these abbreviations (only if "." is in pause_at_characters).
seconds_per_pause_step
@export var seconds_per_pause_step: float = 0.3[Export] public float SecondsPerPauseStep = 0.3f;The amount of time to pause when exposing a character present in pause_at_characters.
is_typing
var is_typing: boolpublic bool IsTypingWhether the label is currently typing itself out.
dialogue_line
var dialogue_line: DialogueLinepublic DialogueLine DialogueLineMethods
type_out
func type_out() -> voidpublic async void TypeOut()Starts typing out the text of the label.
skip_typing
func skip_typing() -> voidpublic void SkipTyping()Stop typing out the text and jump right to the end. This will emit skipped_typing.