Skip to content

Add note on awaiting signals with multiple parameters #10895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tutorials/scripting/gdscript/gdscript_basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2545,6 +2545,13 @@ This also means that returning a signal from a function that isn't a coroutine w
With this type safety in place, a function cannot say that it returns an ``int`` while it actually returns a function state object
during runtime.

When awaiting a signal which had multiple parameters, such as ``signal item_dropped(item_name, amount)``, the result of the await will become an array of the parameter's values::

func dropped_item():
var result = await item_dropped
print(result[0] + " was dropped " + result[1] + " times")


Assert keyword
--------------

Expand Down