#Can't set exported signal var

15 messages · Page 1 of 1 (latest)

pallid osprey
#

instead of @export flash_signal: Signal you should use signal flash_signal()

#

there's no need to export signals, and they're a separate category of property not a variable

#

unless i'm misunderstanding what you're trying to do

compact fiber
pallid osprey
#

it's not possible to it that way in the edtior at least, i'm not even sure it is able to serialize Signal objects to store in a scene or resource

#

i don't see a super elegant solution, what you could do is duck type around it, eg make it accept a Node or Resource in 'flash_signal', and make it check if the passed object has a signal by some expected name and subscribe to that if so

#

but not sure what you'd gain compared to making the signal connection the usual way in the editor

compact fiber
#

I think I have an idea of how I'll do it so consider it solved

#

Thanks still

#

I'm interested in reasons why some objects appear greyed out when counting signals

pallid osprey
#

sometiems it helps to reload the editor to see signals

compact fiber
#

That didn't do it, it's still greyed out

#

They are greyed out cuz they don't have a script, so how can I connect them without giving all of them scripts, I want some node features to be triggerable by signals

pallid osprey
#

that's not possible from the editor, it can only connect to methods defined in script, if you connect from code it's possible