Wait until script?

Version: 4.2.1

Question: Is there anything for example “WAIT UNTIL VAR == 1” I really need to know

https://gdscript.com/solutions/coroutines-and-yield/

There is an await feature in gdscript. You can add a getter and a setter to emit a signal easily.

signal your_signal

var variable: int 
   get:
      return variable
   set(value):
      if value == 1:
         your_signal.emit()
      variable = value

You can wait for this signal like

# somewhere inside your codebase
await _node_with_your_signal.your_signal
print("signal has been emitted")