A problem with cloning

questions
clones
debug
tagica
answered

#1

I am making a fighting game where one of the attacks is a spread of snowflakes fired from the character. The code is as follows (this is the snowflakes code):
when snowflake is tapped: {
repeat 3 times: (
create a clone
)
}

when object is cloned:{
set position x: (enemy’s x - 75) y: (enemy’s y)
set angle: (random from 150 to 210)
move forward: (1000)
set invisibility: (100)

This works fine the first time, but when I do it again, it makes a lot more clones than the first time. Then, the next and next time, it makes EVEN MORE clones, and makes my iPad really slow. Is there a way for me to streamline or modify my code to fix this? Please reply!

Here is a photo of the code:


#2

For the repeat times three create a clone. Put it inside of a block that says “Check once if self clone index = 1”


#3

that’s a dead account boiii
thanks anyway though for anyone having this problem


#4

Don’t put down the repeat and just put 3 create a clone blocks.Hope this helps!


#5

Haha! My account isn’t dead boii! Lol I just got it out of the Cryo freezing pod when I got the email for a reply to my topic! Thanks for the reply even though I don’t really use hopscotch much anymore.