summaryrefslogtreecommitdiffstats
path: root/dialogues
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-12-04 22:04:59 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-12-04 22:04:59 +0200
commit872d1f9200584973b2156102f0e7f03b3d271687 (patch)
tree0177cda13042d5e0b924d8dbe74f444a89034c27 /dialogues
parentf97ee1d7c41e07296b6c31b9b85aa299805ba2f1 (diff)
Add initial dialogue system
Diffstat (limited to 'dialogues')
-rw-r--r--dialogues/test1.gd14
-rw-r--r--dialogues/test1.gd.uid1
2 files changed, 15 insertions, 0 deletions
diff --git a/dialogues/test1.gd b/dialogues/test1.gd
new file mode 100644
index 0000000..e7752b3
--- /dev/null
+++ b/dialogues/test1.gd
@@ -0,0 +1,14 @@
+class_name DialogueTest1
+extends Dialogue
+
+@onready var player: Player = parent.get_node("Player")
+@onready var npc: Node2D = parent.get_node("DialogueTestNPC")
+
+func _ready():
+ player.request_state_init()
+
+ await say(player, "hello")
+ await say(npc, "well hi")
+
+ player.request_state_normal()
+ print("dialogue done")
diff --git a/dialogues/test1.gd.uid b/dialogues/test1.gd.uid
new file mode 100644
index 0000000..57573c2
--- /dev/null
+++ b/dialogues/test1.gd.uid
@@ -0,0 +1 @@
+uid://23xqfts2fuwx