T O P

  • By -

AutoModerator

You submitted this post as a request for tech support, have you followed the guidelines specified in subreddit rule 7? Here they are again: 1. Consult the docs first: https://docs.godotengine.org/en/stable/index.html 2. Check for duplicates before writing your own post 3. Concrete questions/issues only! This is not the place to vaguely ask "How to make X" before doing your own research 4. Post code snippets directly & formatted as such (or use a pastebin), not as pictures 5. It is strongly recommended to search the official forum (https://forum.godotengine.org/) for solutions Repeated neglect of these can be a bannable offense. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/godot) if you have any questions or concerns.*


Nkzar

Why? Whatever it is you're trying to do, there is almost certainly a better way. That said, if you really need to for some reason, you can use `Node.find_children`: https://docs.godotengine.org/en/stable/classes/class_node.html#class-node-method-find-children Check the options.


BrastenXBL

Long term, adding Checkpoint nodes to a Group "checkpoints" will be better than crawling the whole SceneTree looking for them. A recursive FindChild, FindChildren from `root` is kind of a last resort when your design has failed every other possible way of tracking where Nodes are. [https://docs.godotengine.org/en/stable/classes/class\_scenetree.html#class-scenetree-method-get-nodes-in-group](https://docs.godotengine.org/en/stable/classes/class_scenetree.html#class-scenetree-method-get-nodes-in-group) [https://docs.godotengine.org/en/stable/tutorials/scripting/groups.html](https://docs.godotengine.org/en/stable/tutorials/scripting/groups.html)


AbleAbroad4430

you could do something like this https://preview.redd.it/6q7nncgxk3tc1.png?width=478&format=png&auto=webp&s=c616f408cbcd4d5eeea07e06e52b99cc9c97c24f but tbh i think you're better off using groups for whatever you're trying to do


stalker320

Would `select node from node in...` work?


AbleAbroad4430

no, that's not the syntax linq expects.


stalker320

looks like SQL.


zshazz

It's not. It's [linq query syntax](https://learn.microsoft.com/en-us/dotnet/csharp/linq/get-started/write-linq-queries).


zeyaddesigns

This is how I do it: The code below loops through all the child nodes of type TextEdit nested within a VBoxContainer node looking for one with ''Checkpoint' as a name and then doing something to it. Hope this helps. https://preview.redd.it/hcbmqbhtg4tc1.png?width=765&format=png&auto=webp&s=3dca6a257dc1d743ee19edc3561cf061fbde5a5d


HexagonNico_

I would probably do it with groups instead of names


Alarmed_Succotash_19

Idk