Hi every one,
I built a map on which various NPC are traveling.
The tree looks like :
|_NPC (scene instance)
NPC movements are handled in the script of the npc Scene. My main node creates them, instantiate the childrens, and keep track of them in a dictionary (NPC_name: Instance)
When a NPC reaches its destination, it is supposed to emit a signal, that send his own instance so that the main script can remove it from the traveling table (another dictionary)
it goes like this :
elif path_2D.size()==1 and move_distance > distance_to_next:
position = path_2D
print("set NPC moving process off")
print("Emit signal for end of travel")
Nothing special actually.
The problem is that my main script never reacts when my codes reaches the "emit_signal".
The codes looks like this and is never triggered :
print("checking who has arrived")
for i in npc_dic:
print("Npc ",i," has arrived at ", position)
The signal has been connected through the editor/inspector. I see the green arrow next to my code in the MainScript.
Any idea regarding what I did wrong ?
Many thanks for your help !