#How do I make signals "public"?

1 messages · Page 1 of 1 (latest)

unreal torrent
#

If I'm understanding your problem correctly. You can fix this by having a global singleton handle the signals.
Have every object that needs to listen to the signal connected to this global object, then have every object that needs to emit this signal reference the object to emit said signal.

molten sierra
molten sierra
#

I did this now and it seems to work:

#
        if child is Enviroment_RayCast3D:
            child.EnviromentDetection.connect(_danger_map)```
unreal torrent
# molten sierra mhh yea, but as this is for a base enemy I would have multiple scenes later on t...

Nope.
https://docs.godotengine.org/en/stable/tutorials/scripting/singletons_autoload.html
You can make it so that the singleton stays loaded across scenes loading and unloading.

molten sierra
unreal torrent
#

I do not understand what your code is trying to achieve or how any of it relates to your initial question.

molten sierra