extends Scene # Declare member variables here. Examples: # var a = 2 # var b = "text" signal entered_from_pasture var target: Vector2 # Called when the node enters the scene tree for the first time. func _ready(): super() pass # Replace with function body. func _process(delta): super(delta) #var cam = get_viewport().get_camera_2d() #if target: # #cam.global_position = $SetPiece/thingpoint.global_position #+= ($SetPiece/thingpoint.global_position - cam.global_position).normalized() * 5000.0 * delta #cam.zoom = lerp(cam.zoom, Vector2(1.5, 1.5), 1.15 * delta) #else: #cam.position=Vector2(0,0) #super(delta) # Called every frame. 'delta' is the elapsed time since the previous frame. #func _process(delta): # pass var pasture = preload("res://scenes/healer_pasture/healer_pasture.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($"pasture-exit-point".global_position), true) start_main_script(ScriptBuilder.init(ScriptBuilder.walk_path(self.ego, path)) .and_then(ScriptBuilder.transition(self, pasture, "healers-exit-point")) .and_then(ScriptBuilder.walk_to_deferred("healers-exit-point", "healers-entrance-point")) .can_interrupt().build(self, "_on_script_complete")) func _on_entered_from_pasture(): print("HERRREERERE") func _on_set_piece_interacted(): target = $SetPiece/thingpoint.global_position $AnimationPlayer.play("focus_thing")