Discuss Scratch

7734f
Scratcher
500+ posts

How Do Clones Work?????

How do clones do actions once they are created?
dr3w8
Scratcher
100+ posts

How Do Clones Work?????

Use the “clone startup” block (in the Control section) to program what the clones do once “create clone of myself” is used. It's like “when green flag clicked” but it only activates when your sprite is cloned.

Last edited by dr3w8 (Feb. 3, 2013 16:21:39)

7734f
Scratcher
500+ posts

How Do Clones Work?????

Thanks!
MMHMMH
Scratcher
100+ posts

How Do Clones Work?????

A clone will do whatever is under the
whenIstartasaclone
block in one sprite's script.

So basically, if you had:
whenclickedforeverwait.1secs.createcloneofmyself
and
whenIstartasaclonerepeat10gotomouse-pointerdeletethisclone
in one sprite, the clone made by that sprite would go to the mouse-pointer forever, or until it was deleted by using the
deletethisclone
block. One misconception that I had when I started using clones was that if I used the
hide
block on them, they would delete, but hiding them doesn't delete them. It would soon breach the clone limit of 301 clones and lag up the project.

Hope that helps!

Last edited by MMHMMH (June 30, 2014 18:20:11)

Powered by DjangoBB