Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Bot moving
- Tr43212
-
24 posts
Bot moving
I'm make a shooting game with a bot but i don't know how to make a bot move and shoot![](//cdn.scratch.mit.edu/scratchr2/static/__bb3557f20269825e1d5669a135f1636b__/djangobb_forum/img/smilies/sad.png)
![](http://cdn.scratch.mit.edu/scratchr2/static/__bb3557f20269825e1d5669a135f1636b__/djangobb_forum/img/smilies/sad.png)
- ForegoingAZA909
-
52 posts
Bot moving
I'm not sure if this will help entirely because I don't know how much of your project you've finished yet (like if you've already coded shooting) but assuming you have, try a
point towards [sprite v]
when I receive [cool idea v]Hi! I'm ForegoingAZA909, who also goes by names such as: Fore, AZA, 909 (by like, one guy), ToaSt, Storyboard, ToaSb (???), and more(probably).
if <(pick random (1) to (2)) = [1]> then
set [ambition v] to [99999]
wait (1) weeks
set [motivation v] to [0]
end
- Scratchsanity
-
9 posts
Bot moving
And for the shooting create a new sprite called enemy bullet and put this code:
when green flag clicked
[forever
wait (3) secs
create clone of [ myself]
end]
[when I start as a clone
point towards [Player]
move (2) steps
if <touching [ player or edge] ?> then
delete this clone
end]
Then in the player sprite put If touching enemy bullet then die
- Discussion Forums
- » Help with Scripts
-
» Bot moving