Topic was automatically imported from the old Question2Answer platform.
Asked By
AgungGD
hello, im new in godot. im trying to remake flappy bird game using godot 4. I want to delete the pipes, a solution i can think is to select the first node and delete it. but i dont know how to select the first child of a node in godot
yourNode.get_child(0) -- Will get the first child
yourNode.get_child_count() -- Will tell you the number of children
yourNode.get_children() -- Returns a list that you could iterate as below:
for yourChild in yourNode.get_children():
yourNode.remove_child(yourChild)
yourChild.queue_free()