Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Im trying to make like a tower defense game but i dont under stand how to make a tower fire at the cubes(the enemies)
- humanhuman123
- Scratcher
3 posts
Im trying to make like a tower defense game but i dont under stand how to make a tower fire at the cubes(the enemies)
Please help
- TheWarForTheRepublic
- Scratcher
50 posts
Im trying to make like a tower defense game but i dont under stand how to make a tower fire at the cubes(the enemies)
I know this isn't help and I do know in fact that it is cheesy but you can basically search up “how to make tower defense game in scratch” and there is a lot of resources there to help you. The tutorials are simple and easy to follow. The only thing you really need is spare time
cheese
- il_GG
- Scratcher
31 posts
Im trying to make like a tower defense game but i dont under stand how to make a tower fire at the cubes(the enemies)
Script of the clone tower:
Script of enemy clone:
Script of enemy search(not clone)
Script of the shot:
when I start as a clone
forever
wait (2) secs
set [Tower x] to (x position)
set [Tower y] to (y position)
broadcast [Tower shot]
end
Script of enemy clone:
when I start as a clone
forever
set [Enemy x] to (x position)
set [Enemy y] to (y position)
if <touching [shoot] ?> then
delete this clone
end
end
Script of enemy search(not clone)
when green flag clicked
forever
go to x: (Enemy x) y: (Enemy y)
end
Script of the shot:
when I receive [Tower shot]
create clone of [my selfe]
when I start as a clone
go to x: (Tower x) y: (Tower y)
point towards [enemy search]
repeat until <<touching [enemy] ?> or <touching [edge] ?>>
move (4) steps
end
delete this clone
Last edited by il_GG (Feb. 25, 2022 17:48:03)
- humanhuman123
- Scratcher
3 posts
Im trying to make like a tower defense game but i dont under stand how to make a tower fire at the cubes(the enemies)
Thank you The War
- Discussion Forums
- » Help with Scripts
- » Im trying to make like a tower defense game but i dont under stand how to make a tower fire at the cubes(the enemies)