Hello, I’m making my first project where I have multiple copies of a node emitting the same signal to a single parent node, e.g.:
each 4th frame children emit “hit” signals with “target” and “damage” as arguments;
each 4th frame parent calls queue_free() on child if it has no hp
The problem is: parent receives some of the signals at FRAME+1 (no such signals are emitted at this frame) and tries to address an already dead node (it was already hit at FRAME+0 by someone else)
Is it expected behavior? What would be a correct approach here?
The problem is, in my plan, “signal_manager” node should call change_hp for the target at the same frame the signal was emmited, but as I can see (the signals probably don’t work this way) some of the emitted hits with a same target (in a single frame) can invoke “change_hp” at the next frame