#How do I make signals "public"?
1 messages · Page 1 of 1 (latest)
mhh yea, but as this is for a base enemy I would have multiple scenes later on that contain a singelton, wouldnt that cause some problems later on?
I did this now and it seems to work:
if child is Enviroment_RayCast3D:
child.EnviromentDetection.connect(_danger_map)```
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.
Introduction: Godot's scene system, while powerful and flexible, has a drawback: there is no method for storing information (e.g. a player's score or inventory) that is needed by more than one scen...
I see, ill look into it
thx
but that would exist above all scenes, and I need multiple of these
@unreal torrent this is the code I got rn + some pseudocode as comments, it does have a key issue though it says "-Y" to be a invalid key in the _danger_map function, so on line 48:
https://gist.github.com/PepbpeZ/834d60d173a1291204133985585a8ec0
I do not understand what your code is trying to achieve or how any of it relates to your initial question.
for child in ENVRaycasts.get_children():
if child is Enviroment_RayCast3D:
child.EnviromentDetection.connect(_danger_map)```