[SOLVED] Duplicating GUI Nodes

Hi, it has been a while since I was last here (I am still a noob) :sweat_smile:

So here is my problem:
(I have a GUI with a node)
I want to duplicate it (when it is clicked on)
Have it in the same position
Then move/animate it to a different position when it has “spawned”

Things in brackets = I know what to do

Any thoughts?

  • Use gui.clone() to duplicate a single node or gui.clone_tree() to duplicate a node and its children (cloned nodes stay in the same position by default)
  • Check out the button example for making a clickable GUI node
  • Defold has a nice animation system that works on both game objects and GUI nodes

Feel free to ask if you need help using these :slightly_smiling_face: .

5 Likes

Thanks, I will try this out!