NPCs can take quests!
This commit is contained in:
@@ -54,6 +54,9 @@ func approach(pos : Vector2) -> void:
|
||||
set_movement_target(point)
|
||||
|
||||
func approach_and_interact(obj : Interactable) -> void:
|
||||
var t : Vector2 = obj.global_position
|
||||
if obj.has("queue") and obj.queue != null:
|
||||
t = obj.queue.global_position
|
||||
set_movement_target(obj.global_position)
|
||||
nav_agent.target_desired_distance = interaction_range - 5
|
||||
interaction_target = obj
|
||||
|
||||
Reference in New Issue
Block a user