![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | ouhellouder |
i have this code
func _on_clsedoor_button_down():
if $MainHall/Teddyspawnpoint.has_node(“MainHall/Teddyspawnpoint/TheTeddyright”):
$MainHall/Teddyspawnpoint/TheTeddyright.queue_free()
but somehow when i press button it doesn´t make queue_free
Not to nitpick, but as the problem is likely a coding issue, we need to be able to read the code. Could you edit your question, and format the code? You should be able to highlight the code in the webpage, and click the big curly braces tool. When you see the preview it should look like code.
An amazing number of problems are simply queue_free()
versus queuefree()
or the like.
CharlesMerriam | 2021-02-01 07:44
hi at least thx for reply i checked queue_free in my code here is again
func _on_clsedoor_button_down():
if $MainHall/Teddyspawnpoint.has_node("MainHall/Teddyspawnpoint/TheTeddyright"):
$MainHall/Teddyspawnpoint/TheTeddyright.queue_free()
this is my code i made some tests but if there isn´t
“MainHall/Teddyspawnpoint/TheTeddyright” and i press down button it returns error node not found so i decided to look after somethink that will check if there is that node if yes then it will do queue_free() and if not it will do nothing
that´s why im here
ouhellouder | 2021-02-01 12:29