Your Godot version:
4.1.3
Issue description:
I recently learned that by doing var x = await signal_name, where signal_name is a signal instead of a function, x will be assigned the parameters passed to the signal (x will be array when there are multiple parameters). This behavior is immensely helpful for my project and enables a lot of interesting code patterns.
Unfortunately, I cannot find this behavior documented anywhere. I believe this should be documented on the GDScript page, in the section dedicated to await. The page currently only mentions await assigning function return values, but not the parameters of signals. For a long time this made me believe that awaiting signals with assignment is not possible.
URL to the documentation page:https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html#awaiting-for-signals-or-coroutines
Your Godot version: 4.1.3 Issue description: I recently learned that by doing
var x = await signal_name
, wheresignal_name
is a signal instead of a function, x will be assigned the parameters passed to the signal (x will be array when there are multiple parameters). This behavior is immensely helpful for my project and enables a lot of interesting code patterns.Unfortunately, I cannot find this behavior documented anywhere. I believe this should be documented on the GDScript page, in the section dedicated to await. The page currently only mentions await assigning function return values, but not the parameters of signals. For a long time this made me believe that awaiting signals with assignment is not possible. URL to the documentation page: https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html#awaiting-for-signals-or-coroutines