Skip to content

Dialogue

Inherits: Resource < RefCounted < Object

Description

Dialogue as a resource that have been parsed from the written dialogue text file. Load it from a *.dlg file, or from a String directly with .new().

var dlg := Dialogue.load("res://my_dialogue.dlg")
# or
var dlg := Dialogue.new("""
  Godette:
    "Hello, world!"
""")

Methods

Returns Function
int get_length()
String get_source_path()
Dialogue load( path: String ) static

Method Descriptions

int get_length()

Returns the dialogue line count.


String get_source_path()

Returns the path of written dialogue text file source. If the dialogue is created in a script using new(), it will returns the script's path and the line number from where the dialogue is created (e.g. res://script.gd:26).


Dialogue load( path: String ) static

Load written dialogue text file from path.