![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | kuldeep Mourya |
exit_tree signal not working
new_ground.connect("exit_tree",self,spawn_and_move())
how can I solve this?
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | kuldeep Mourya |
exit_tree signal not working
new_ground.connect("exit_tree",self,spawn_and_move())
how can I solve this?
![]() |
Reply From: | Zylann |
The exit_tree
signal does not exist anymore. It was replaced in Godot 3 by tree_exiting
and tree_exited
:
new_ground.connect("exit_tree",self,spawn_and_move())
Also, this is wrong code to connect signals, the 3rd argument should be a string. I don’t know what spawn_and_move
returns, but you probably intented this instead:
# Will call spawn_and_move() when new_ground has exited the tree
new_ground.connect("tree_exited", self, "spawn_and_move")
Wow, Thank you so much finally solved! <3
kuldeep Mourya | 2020-04-10 19:04