Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do you tell a clone which # it is?
- ThunderGuns
-
25 posts
How do you tell a clone which # it is?
I am making a sandbox type game. you are able to spawn humans, and the humans have an AI system. Since the AI system used a lot of variables, I decided to use lists for the clones. I have everything else hooked up right, but I need to be able to tell a clone which # it is. How would I do this?
- z8_
-
100+ posts
How do you tell a clone which # it is?
Put in this code in the sprite that generates the humans:
when green flag clickedHope this helped!
set [clone count v] to [0]
forever
your clone spawning code::grey
end
when I start as a clone
change [clone count v] by (1)
set [clone id v] to (clone count) // only for this sprite
clone code::grey

- ThunderGuns
-
25 posts
How do you tell a clone which # it is?
It worked!! Thanks sooo much! ur a big help 

- Discussion Forums
- » Help with Scripts
-
» How do you tell a clone which # it is?