For a debugging purposes, I put await signal to see the label message in turn-based combat. My function takes both moves (player’s and cpu’s), so to see dmg/effects I need to put await between damage functions (no animations yet). I wanna put 2 sec delay or signal “mouse_clicked”, however they don’t work together. await (get_tree().create_timer(2).timeout or mouse_clicked) # nothing works await get_tree().create_timer(4).timeout or mouse_clicked # timeout works
To be honest I’m surprised the parser allows that syntax. you are using a logical or where await is is requires a signal variable. I don’t think it’s possible to await multiple signals simultaneously.
When you wrap in parentheses you are forcing the logical or to make a true/false expression evaluation. I’m surprised that await allows this syntax.
Without the parentheses I assume the await takes the first signal it finds and ignores the or and beyond. Or it somehow becomes part of the expression? Idk
There is a proposal for this syntax.
My suggestion would be to create an aggregate emitting signal function that will emit a new signal whenever the other two signals happen. And you should start a timer connected to that new function.