In my horror project, I have a "scare" event that is an Area2D and when a player enters it, the monster event inside it "awakens" and begins chase. I am having a hangup as the monster object has to enable its collision when it awakens and this seems to be where I am getting this error. The debugger is telling me the answer, i am just trying to figure out how to implement it with the methods I am using. I am only re-enabling ONE physics box.
E 0:00:01.771 body_set_shape_disabled: Can't change this state while flushing queries. Use call_deferred() or set_deferred() to change monitoring state instead.
extends Area2D
func _awakening():
$Patches._isAsleep = false
$Patches._collision.disabled = false
$Patches._move_state($Patches._deltaRef)
self.remove_child($Patches)
func _on_ScareEvent_body_entered(body):
if body.name == 'Lydia':
_awakening()
self.queue_free()