Godot Version
4.1.3
Question
I have two functions, one that triggers when the area is exited, and another that triggers when the area has something in it and the user clicks. The problem is, when the input function is triggered, it will trigger the area_exited function at the same time. How could I make it where only the appropriate function is triggered?
func _on_area_entered(area):
inside = true
func _on_area_exited(area): # Area Exited Function
inside = false
print("Trigger")
func _input(event): # Input Function
if event.is_action_pressed("Click") and inside == true:
give_points.emit()
clear_dot()
print("Trigger")