Discuss Scratch

pndaJ
Scratcher
6 posts

how do i select a specific clone's x or y axis

i cant get my clones to spawn another clone at its x axis
Braeden5454
Scratcher
500+ posts

how do i select a specific clone's x or y axis

go to x: (sprite 1's X ::motion) y: (150)
Hope that helps.

Last edited by Braeden5454 (May 13, 2014 01:47:31)


No text here-> Haha April Fools, You spent 3 seconds highlighting this.
move () steps

If you think my post was helpful, you may want to Follow me to receive updated and useful tips.
I am raeden5454. You can check out some more projects at My Prof
404 Error. Cannot find page “signature”. Reason: Kumquat consumption
Kenichi10B
Scratcher
74 posts

how do i select a specific clone's x or y axis

With Scratch, clones each inherit their own local variables. To differentiate each clone, use a script like:
set [CloneID v] to [0]
repeat (#ofClones)
change [CloneID v] by (1)
create clone of [myself v]
end

That makes it so each clone will have a different ‘CloneID’ and can be distinguished from each other.

Then, have each clone update it's position in lists (2 for X and Y, or combining the two into 1 list works; here's the simpler way):
forever 
replace item (CloneID) of [XPositions v] with (x position)
replace item (CloneID) of [YPositions v] with (y position)
end

That then makes each clone constantly update its item in the list with its X position.

Then, for spawning clones, all you have to do is something like (For the new clone's script):
when I start as a clone
go to x: (An item of the 'Xpositions' list) y: (Something)

Last edited by Kenichi10B (May 13, 2014 09:26:51)

Powered by DjangoBB