Files
ai-game-2/scenes/healer_pasture/healer_pasture.gd
2024-06-24 12:04:29 -07:00

34 lines
1.1 KiB
GDScript

extends Scene
# Called when the node enters the scene tree for the first time.
func _ready():
super()
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
var healers = load("res://scenes/healers/healers.tscn")
func _on_pasture_exit_interacted():
var path = NavigationServer2D.map_get_path(self.map, self.pathfind.to_local(self.ego.global_position), pathfind.to_local($"healers-exit-point".global_position), true)
start_main_script(ScriptBuilder.init(ScriptBuilder.walk_path(self.ego, path))
.and_then(ScriptBuilder.transition(self, healers, "pasture-exit-point"))
.and_then(ScriptBuilder.walk_to_deferred("pasture-exit-point", "pasture-entrance-point"))
.can_interrupt().build(self, "_on_script_complete"))
func _on_entered_from_pasture():
print("HERRREERERE")
func _on_entranceexit_interacted():
start_main_script(ScriptBuilder.init(
ScriptBuilder.say(self.ego, "Looks light a hot air balloon.", false)
)
.and_then(ScriptBuilder.say(self.ego, "Just like gramps"))
.build(self, "_on_script_complete"))
pass # Replace with function body.