Using clones easily


#1

Alright so, I have a small game I'm working on where arrows from four directions come at you(a heart) and you have to block them with an object(L block) You use arrow buttons to direct the L block to avoid from them hitting the heart. Once you do, I have them teleport away, go invisible, and spawn a new clone( which shows up at the original position(A template, so to speak). The problem is, the teleported clone spawns a new clone, and so on. to the point where after blocking four to five arrows, there's 20-40 clones stacked in the corner. Which causes a lot of lag. Since they will come in waves, it's really hard to reuse them, or make a grid of them that I can teleport with out extending the code in a ridiculous amount of blocks. Is there anyway to ONLY make the original template arrow to spawn a clone, and not the others? I did suggest a "Delete this Clone" block, but Hopscotch isn't interesting in that way, instead making the game faster so... yeah. I know @MagmaPOP can give ideas on this, and I'm willing to take(almost) any ideas. Thanks!
-Paz
(sorry for this long post :smile:)


#2

Can you send some pictures of the code? Edit: Have you checked the code of the teleported arrow, (does it say make a new clone)?


#3

After the clone teleports away make it (repeat forever (wait 500))!
@pazon123


#4

Thanks Magma that seems to work.