#Connecting custom signals with arguments

7 messages · Page 1 of 1 (latest)

mighty cosmos
#

Hey guys I could use some help understanding how signals with arguments work.

In child:
signal playerSpawnerFound(playerSpawner)
...
playerSpawnerFound.emit(playerSpawner)

In parent:
room.playerSpawnerFound.connect(setCharSpawner)
...
func setCharSpawner(node):
print_debug(node)

I have been researching for an hour and can't figure out why setCharSpawner(node) isn't called. I think my emit is correct but the connecting part is wrong. Is my syntax wrong? The docs don't do a good job of showing how to use custom signals with arguments.

ancient citrus
#

If it were wrong then you would see an error

#

aer you sure the signal is emitted?

mighty cosmos
#

Absolutely positive, and yes I get 0 errors. The function I'm attempting to connect to just doesn't get called

ancient citrus
#

weird

#

then i dunno

#

because it looks right to me