Allow generic Signals #9916
shak2
started this conversation in
General Discussions
Replies: 1 comment 3 replies
-
So I looked into it and it looks like this functionality is covered by notify_groups() in Scenetree, but what that does exactly is not explained anywhere in docs or the general internet so I have no idea how to use notify_group() or what it does. Could we please get a page in docs explaining notify_group()? Maybe it could be added to the Groups tutorial page? https://docs.godotengine.org/en/stable/tutorials/scripting/groups.html |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
To receive a signal in code the current pseudo-code is:
SENDERNAME.SIGNALNAME.connect(FUNCTION)
I'd like to be able to do a general signal receive too using just:
SIGNALNAME.connect(FUNCTION)
For example, this is saying: instead of "look for red signal from watchtower 3" it is just "look for red signal". That way, any generic node can send out that signal, and any node with the right code can receive the signal without knowing/tracking/storing the node name of who sends it out.
This is supported by Godots push for encapsulation and separation.
NOTE: I am proposing keep 1 and add 2 as additional functionality, not replace 1 with 2!, (since sometimes it is useful to have the node named.)
Beta Was this translation helpful? Give feedback.
All reactions