Godot Version
4.2.2 Stable
Question
Hello!
I’m using the set_deferred(“disable”, true/false) method on a collision shape 2D and it is straight up not changing anything.
The purpose here being that this particular collision shape 2D is a hurtbox on an entity that only should deal damage when in a certain state (i’m using a Finite State Machine) and if it does collide with something it would deal damage to while not in the proper state, the game straight up crashes. The damage is dealt by the entity (a CharacterController2D) colliding with the other entity (a StaticBody2D). Imagine a character hitting a crate or something.
What’s very strange to me is that i use the set_deferred for the same exact thing, in the very same script but on different collision shapes and it works just fine:
This line on the first physics frame doesn’t do anything, the others do.
Same story here, PASSIVEradar and STRIKEradar are modified accordingly, not HURTbox.
I’m at a complete loss to what’s actually happening here so any lead is very welcome!
Thank you and have a nice day