Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make clones go to clones
- THEPUG_GAMER
-
Scratcher
7 posts
How to make clones go to clones
I am making a game where collectibles (clones) can spawn. If you don´t collect one within 5 seconds, they despawn and create bullets that move outwards. Unfortunately, I do not know how to make the clones of the bullets to go to the position of the collectible clones. If you could help me with this, I would appreciate it.
Last edited by THEPUG_GAMER (Oct. 17, 2022 16:14:14)
- 2dav
-
Scratcher
91 posts
How to make clones go to clones
You could use the “point in direction (sprite)” block or “glide(whatever) seconds to (sprite)? Does this help?
- THEPUG_GAMER
-
Scratcher
7 posts
How to make clones go to clones
You could use the “point in direction (sprite)” block or “glide(whatever) seconds to (sprite)? Does this help?If I tried to do that. It would go the original sprite. I´m trying to make it go the clone that triggered it.
- enalecks
-
Scratcher
15 posts
How to make clones go to clones
You could use the “point in direction (sprite)” block or “glide(whatever) seconds to (sprite)? Does this help?If I tried to do that. It would go the original sprite. I´m trying to make it go the clone that triggered it.
on the cloned sprite:
when green flag clicked
create clone of [myself]
when I start as a clone
forever
set [clone x] to (x position)
set [clone y] to (y position)
end
on the sprite going to the clone:
when green flag clicked
forever
go to x: (clone x) y: (clone y)
end
hopefully that's what you meant
- THEPUG_GAMER
-
Scratcher
7 posts
How to make clones go to clones
Sorry, but I decided to change itYou could use the “point in direction (sprite)” block or “glide(whatever) seconds to (sprite)? Does this help?If I tried to do that. It would go the original sprite. I´m trying to make it go the clone that triggered it.on the cloned sprite:
when green flag clicked
create clone of [myself]
when I start as a clone
forever
set [clone x] to (x position)
set [clone y] to (y position)
end
on the sprite going to the clone:
when green flag clicked
forever
go to x: (clone x) y: (clone y)
end
hopefully that's what you meant

- THEPUG_GAMER
-
Scratcher
7 posts
How to make clones go to clones
Sorry, but I decided to change itYou could use the “point in direction (sprite)” block or “glide(whatever) seconds to (sprite)? Does this help?If I tried to do that. It would go the original sprite. I´m trying to make it go the clone that triggered it.on the cloned sprite:
when green flag clicked
create clone of [myself]
when I start as a clone
forever
set [clone x] to (x position)
set [clone y] to (y position)
end
on the sprite going to the clone:
when green flag clicked
forever
go to x: (clone x) y: (clone y)
end
hopefully that's what you meantI removed the collection part and just made it a bullet bomb. You can still collect the bananas though.
- cs2722201
-
Scratcher
100+ posts
How to make clones go to clones
This should help https://scratch.mit.edu/projects/746208975/
- atreides-pao
-
New Scratcher
1 post
How to make clones go to clones
You could use the “point in direction (sprite)” block or “glide(whatever) seconds to (sprite)? Does this help?If I tried to do that. It would go the original sprite. I´m trying to make it go the clone that triggered it.on the cloned sprite:
when green flag clicked
create clone of [myself]
when I start as a clone
forever
set [clone x] to (x position)
set [clone y] to (y position)
end
on the sprite going to the clone:
when green flag clicked
forever
go to x: (clone x) y: (clone y)
end
hopefully that's what you meant
Last edited by atreides-pao (Dec. 5, 2024 04:43:27)
- JustPeaceMaker
-
Scratcher
5 posts
How to make clones go to clones
when green flag clicked
delete this list of [cloned x positions v]
delete this list of [cloned y positions v]
forever
wait (0.1) seconds
delete this list of [cloned x positions v]
delete this list of [cloned y positions v]
repeat (number of clones)
add (x position of [cloned sprite v]) to [cloned x positions v]
add (y position of [cloned sprite v]) to [cloned y positions v]
end
if <(distance to (item (1) of [cloned x positions v]) (item (1) of [cloned y positions v])) > (5)>
turn towards (item (1) of [cloned x positions v]) (item (1) of [cloned y positions v])
move (5) steps
end
Last edited by JustPeaceMaker (Dec. 31, 2024 10:42:06)
- abrakaidabra
-
Scratcher
500+ posts
How to make clones go to clones
Please don’t necropost. If you want to test scratchblocks, there is an official sticky at the top of the help with scripts forum.move (10) steps
- cosmosaura
-
Scratch Team
1000+ posts
How to make clones go to clones
Topic closed due to necroposting.
- Discussion Forums
- » Help with Scripts
-
» How to make clones go to clones









