Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how to make a sprite shoot the closest enemy
- urbanprophet
-
4 posts
how to make a sprite shoot the closest enemy
Hi, one of my student is making a project and i'm not sure what kind of script to use.
You can see his project here:
https://scratch.mit.edu/projects/776417695/
The gun is moving up/down with W/S and when you touch the $$$ sign on top, an automated turret appears. It orients with the zombies (green circles swarming) and shoots them.
How to make the turret orients and shoot always the closest zombie??
thanks for your help
You can see his project here:
https://scratch.mit.edu/projects/776417695/
The gun is moving up/down with W/S and when you touch the $$$ sign on top, an automated turret appears. It orients with the zombies (green circles swarming) and shoots them.
How to make the turret orients and shoot always the closest zombie??
thanks for your help
- crstalgem228
-
100+ posts
how to make a sprite shoot the closest enemy
I can try to help! I'm gonna remix your project and see if I can do it Hi, one of my student is making a project and i'm not sure what kind of script to use.
You can see his project here:
https://scratch.mit.edu/projects/776417695/
The gun is moving up/down with W/S and when you touch the $$$ sign on top, an automated turret appears. It orients with the zombies (green circles swarming) and shoots them.
How to make the turret orients and shoot always the closest zombie??
thanks for your help
- crstalgem228
-
100+ posts
how to make a sprite shoot the closest enemy
uhh sorry, it's a bit hard for me too. sorry I can't help Hi, one of my student is making a project and i'm not sure what kind of script to use.
You can see his project here:
https://scratch.mit.edu/projects/776417695/
The gun is moving up/down with W/S and when you touch the $$$ sign on top, an automated turret appears. It orients with the zombies (green circles swarming) and shoots them.
How to make the turret orients and shoot always the closest zombie??
thanks for your help

- happyfrog123456789
-
1 post
how to make a sprite shoot the closest enemy
pls figer out people
- wavewavegame
-
26 posts
how to make a sprite shoot the closest enemy
Hello, I found a similar project that has something that you are looking for!
https://scratch.mit.edu/projects/848896617/
It creates a list of every sprite's distance to the player, and points to the nearest one.
https://scratch.mit.edu/projects/848896617/
It creates a list of every sprite's distance to the player, and points to the nearest one.
Last edited by wavewavegame (Jan. 19, 2025 17:19:49)
- Discussion Forums
- » Help with Scripts
-
» how to make a sprite shoot the closest enemy