Skip to content

Commit 92186d7

Browse files
committed
Add await signal args example
1 parent f908cdc commit 92186d7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tutorials/scripting/gdscript/gdscript_basics.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2866,6 +2866,14 @@ This also means that returning a signal from a function that isn't a coroutine w
28662866
With this type safety in place, a function cannot say that it returns an ``int`` while it actually returns a function state object
28672867
during runtime.
28682868

2869+
You can store the arguments passed to the signal's parameters in an ``Array``-type variable:
2870+
2871+
::
2872+
2873+
func process_response():
2874+
var signal_args := await $HTTPRequest.request_completed as Array
2875+
print("Response arguments: " + ", ".join(signal_args))
2876+
28692877
Assert keyword
28702878
--------------
28712879

0 commit comments

Comments
 (0)