blob: d411484512a881eb157ce19504c1f4564c010169 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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_forced("DROP")
await say(player, "hello")
await say(npc, "well hi")
var answer = await ask(npc, "buy or sell?", ["buy", "sell"])
await say(npc, "it's %s time" % answer)
player.request_state_normal()
print("dialogue done, answer %s" % answer)
|