Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I Need Assistance
- coolgamevin
-
Scratcher
16 posts
I Need Assistance
To whom this may concern,
I need a custom tutorial on how to make a missile lock on and go to a clone of a sprite, but be able to do the same with multiple sprites' clones.(all of the lemon sprites' clones) and it explodes and eliminates the other lemons' clones near them (including all sprite clones within the area). But, it can only spawn once per game. Here's the project link: https://scratch.mit.edu/projects/1165874005 If you need to play the game or go inside to see what I mean, feel free to do so! BTW, don't mind my quote.
Sincerely, @coolgamevin
I need a custom tutorial on how to make a missile lock on and go to a clone of a sprite, but be able to do the same with multiple sprites' clones.(all of the lemon sprites' clones) and it explodes and eliminates the other lemons' clones near them (including all sprite clones within the area). But, it can only spawn once per game. Here's the project link: https://scratch.mit.edu/projects/1165874005 If you need to play the game or go inside to see what I mean, feel free to do so! BTW, don't mind my quote.
Sincerely, @coolgamevin
Last edited by coolgamevin (Aug. 1, 2026 01:10:50)
- -duckergames-
-
New Scratcher
16 posts
I Need Assistance
lemonoids if it was epic lol
i think i can make it work
when a clone of lemon spawns, give each of them an ID use “for this sprite only” and track their positions on 2 lists, 1 for x and 1 for y .
so if a missile wants to target one, it locks on to that one with the specific ID, and keeps tracking it since that lemon's x and y on the list keeps changing. when the missile has the exact x and y of the lemon (or can have a small deviation), then it explodes with the lemon. hope this helped : D
i think i can make it work
when a clone of lemon spawns, give each of them an ID use “for this sprite only” and track their positions on 2 lists, 1 for x and 1 for y .
so if a missile wants to target one, it locks on to that one with the specific ID, and keeps tracking it since that lemon's x and y on the list keeps changing. when the missile has the exact x and y of the lemon (or can have a small deviation), then it explodes with the lemon. hope this helped : D
- coolgamevin
-
Scratcher
16 posts
I Need Assistance
lemonoids if it was epic lol
i think i can make it work
when a clone of lemon spawns, give each of them an ID use “for this sprite only” and track their positions on 2 lists, 1 for x and 1 for y .
so if a missile wants to target one, it locks on to that one with the specific ID, and keeps tracking it since that lemon's x and y on the list keeps changing. when the missile has the exact x and y of the lemon (or can have a small deviation), then it explodes with the lemon. hope this helped : D
any way you can tell me like what blocks to do cuz when I have to read stuff by brain doesn't work. i'll give u a shout-out on my profile and on the project. sorry i'm incompetent
- -duckergames-
-
New Scratcher
16 posts
I Need Assistance
lemonoids if it was epic lol
i think i can make it work
when a clone of lemon spawns, give each of them an ID use “for this sprite only” and track their positions on 2 lists, 1 for x and 1 for y .
so if a missile wants to target one, it locks on to that one with the specific ID, and keeps tracking it since that lemon's x and y on the list keeps changing. when the missile has the exact x and y of the lemon (or can have a small deviation), then it explodes with the lemon. hope this helped : D
any way you can tell me like what blocks to do cuz when I have to read stuff by brain doesn't work. i'll give u a shout-out on my profile and on the project. sorry i'm incompetent
yea sure
remember “ID” has to be for this sprite only set max ID to 1 at first
the lemons:
when I start as a clone
set [ID v] to ((max ID) + (1))
set [max ID v] to [ID]
forever
replace item (ID v) of [lemonoids's x v] with [x position]
replace item (ID v) of [lemonoids's y v] with [y position]
end
(add a delete this clone block in another script for the lemons or they wont die)
for the missile:
when green flag clicked
target on to lemonoid with (ID)
define target on to lemonoid with (ID)
forever
glide (0.3) secs to x: (item (ID v) of [lemonoid's x v] :: list) y: (item (ID v) of [lemonoid's y v] :: list)
end
also make a script that they explode or disappear when they reach the lemonoid
hope this works

- Discussion Forums
- » Help with Scripts
-
» I Need Assistance