Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | KijeviGombooc |
I have an asteroid node, that has 2 children. The asteroid node has a script, in which i want to spawn two other asteroids when it when dies (descreasing a value on the child so the spawning will stop eventually).
My question is, how can i implement spawning a clone of the node? I did it with using load(“Asteroid.tscn”) but that loads it on every asteroid spawned, if i know well, which isnt efficient i think.
I was thinking maybe i should make a script globally and load the asteroid there, then use it in the asteroid.gd to spawn other asteroids.
Are there any other ways?