Discuss Scratch

blast_pick
Scratcher
6 posts

How do I make a clone go to another clone

Hi I know a lot about scratch but one thing I have never touched was clones and i am literally just now learning about them and I need help with this is keep track of the Position and have a separate clone that will go to the position like if i a clone is created then before its created i set the x pos and y pos into a list then have the other sprite clone go to that pos idk how to though what is there is multiple clones and they all store the x pos and y pos how do i decipher which position in the list to go to its hurting my brain please HELP!!
Malicondi
Scratcher
1000+ posts

How do I make a clone go to another clone

blast_pick wrote:

Hi I know a lot about scratch but one thing I have never touched was clones and i am literally just now learning about them and I need help with this is keep track of the Position and have a separate clone that will go to the position like if i a clone is created then before its created i set the x pos and y pos into a list then have the other sprite clone go to that pos idk how to though what is there is multiple clones and they all store the x pos and y pos how do i decipher which position in the list to go to its hurting my brain please HELP!!
Could you explain what you're trying to do a little better?
(its hard for me to understand what you're trying to do…)
Cool_Dude2022
Scratcher
500+ posts

How do I make a clone go to another clone

blast_pick wrote:

Hi I know a lot about scratch but one thing I have never touched was clones and i am literally just now learning about them and I need help with this is keep track of the Position and have a separate clone that will go to the position like if i a clone is created then before its created i set the x pos and y pos into a list then have the other sprite clone go to that pos idk how to though what is there is multiple clones and they all store the x pos and y pos how do i decipher which position in the list to go to its hurting my brain please HELP!!

I'm not too sure how to help you, could you maybe share the project that you're working on? If you're talking about figuring out which clone is which, you can use costumes or a variable to do that. Here's quick code that I wrote that you could play around with:

when green flag clicked
set [clones v] to [0]
repeat (1)
create clone of [myself v]
change [clones v] by (1)
end

when I start as a clone
add (join (clones) (join ( ) (join (x position) (join ( ) (y position))))) to [clones positions v]
blast_pick
Scratcher
6 posts

How do I make a clone go to another clone

Cool_Dude2022 wrote:

blast_pick wrote:

Hi I know a lot about scratch but one thing I have never touched was clones and i am literally just now learning about them and I need help with this is keep track of the Position and have a separate clone that will go to the position like if i a clone is created then before its created i set the x pos and y pos into a list then have the other sprite clone go to that pos idk how to though what is there is multiple clones and they all store the x pos and y pos how do i decipher which position in the list to go to its hurting my brain please HELP!!

I'm not too sure how to help you, could you maybe share the project that you're working on? If you're talking about figuring out which clone is which, you can use costumes or a variable to do that. Here's quick code that I wrote that you could play around with:

when green flag clicked
set [clones v] to [0]
repeat (1)
create clone of [myself v]
change [clones v] by (1)
end

when I start as a clone
add (join (clones) (join ( ) (join (x position) (join ( ) (y position))))) to [clones positions v]
i could show you the project but it is really big and kinda all over the place i can make a new one to explain better
blast_pick
Scratcher
6 posts

How do I make a clone go to another clone

okay here is the project https://scratch.mit.edu/projects/964435477/ what i want is for the projectile to be created at the zombies position and for which zombie you clicked thats the zombie it goes to
Cool_Dude2022
Scratcher
500+ posts

How do I make a clone go to another clone

blast_pick wrote:

okay here is the project https://scratch.mit.edu/projects/964435477/ what i want is for the projectile to be created at the zombies position and for which zombie you clicked thats the zombie it goes to

You need to add this into Sprite2:



set [projectile spawn coordinates v] to (x position)
wait () secs
set [projectile spawn coordinates v] to (y position)

Then, add this to your projectile sprite:

HedwigsHat
Scratcher
1000+ posts

How do I make a clone go to another clone

when gf clicked
...
repeat (2)
create clone of [myself v]
change [clone id v] by (1)
end
...

when I start as a clone
if <(clone id) = (1)> then
go to x (...) y (...)
else
glide (1) secs to x (...) y (...) // make sure the numbers here are the same as the numbers on top of this
WhoCaresToday
Scratcher
1 post

How do I make a clone go to another clone

what what

Powered by DjangoBB