Hello. I'm going to get strait to the point. I'm trying to duplicate some sprite nodes at my current position. Does anyone know how to? Thanks.
How to duplicates nodes?
Select the node and press ctrl-d, or right-click it and select duplicate.
Do you know how to do this in a script?
- Edited
Oh! That depends on how much you want to duplicate.
Node has a duplicate method which you can tell how much of the node to duplicate with flags, but quite often you'll want to duplicate the node's children as well. That involves a bit more effort.
Edit: Sprites inherit the method from node, in case it wasn't obvious.
If it's saved as a scene, you can make an instance of it and add it to the current scene. https://docs.godotengine.org/en/stable/tutorials/scripting/nodes_and_scene_instances.html
8 months later
Megalomaniak added the Godot Help tag .