-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Signal is not created in specified object #97221
Comments
The documentation is incorrect, or rather unclear, this is not intended to work that way, the description should be improved instead It should say "Creates a signal object referencing a signal named |
What's the deal with empty |
What do you mean? You might be confused here, |
Ok, then why |
Because you can have a static typed variable that needs to start out empty: var signal_to_use : Signal
if use_first:
signal_to_use = first_signal
elif use_second:
...
signal_to_use.emit() But this is more a support question, let's focus on the documentation issue, please discuss other things in the other community channels |
Alright, that's a good reason. That also needs to be mentioned in documentation. |
It is mentioned:
It also says how to declare signals and that it isn't done by creating a |
I would like to contribute to this if you don't mind. |
Yep! |
Tested versions
System information
Godot v4.3.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.5186) - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 Threads)
Issue description
Documentation says:
But testing with this
Results:
I know that function returns a Signal, that seems to be bound to the object (using
print()
). But it's expected to be present in the signal list and accessed like a normal Signal.If it's not part of objects signals, then what's the point to have an object reference as a parameter to
Signal(object, signal_name)
?Signal() without provided parameters is useless, because it doesn't work when created in Array[Signal].
In result Signal construction is a bag of mixed signals.
Steps to reproduce
Signal(self, "damaged")
to create a new signal for the objectget_signal_list()
Minimal reproduction project (MRP)
signal_not_created.zip
The text was updated successfully, but these errors were encountered: