Signal Connection Dialog should allow for removing a signal parameter and replacing it with a predefined one. #11100
Closed
MichaelMacha
started this conversation in
Editor
Replies: 1 comment 2 replies
-
Thank you for your proposal! There's already an open proposal for this however: And we prefer to keep things in one place, so closing this See there for more details and please add any further details you feel might be missing |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I currently have a game in which my player, when entering an Area3D, should trigger an animation in the environment (specifically a bunch of stairs ascending from the ground). This is a
body_entered
signal, which has a single parameter,body
.I have all of the behavior for the stairs, rising from the ground, in an
AnimationPlayer
node. In theory, all I need to call isplay(animation_name : StringName)
when the signal is emitted. So, I'm very close to avoiding any GDScript at all.In my thirty years of coding, I've learned that the less code you write, and the closer you keep your definition to its use, the smaller the error area is and the more likely it is to require less maintenance, and perform its job properly as a project gets bigger. I imagine that that's equally true for games. So, it's extremely important to me in this relatively-early phase to write as few scripts as possible.
My thought is, if, in that dialog box, I can drop the
body
parameter and simultaneously add an extra parameter ofStringName
type, I can do this without a single line, using zero lines of script. That would be optimal for so many things.However, when I increase the argument unbinding count to one, I lose the ability to add an additional parameter; and the best I can do is write a script for it myself. This is rather unfortunate, as I feel like this should be trivial... just unbind one argument, and bind a
StringName
, then send it.As far as I can tell, this is currently impossible without writing code. Is there a reason for this which I'm not seeing? I've reviewed the C++, but it's unfortunately not commented and a little difficult for me to fully understand.
Beta Was this translation helpful? Give feedback.
All reactions