I am making a Star Wars game and i want stormtroopers to walk to somewhere random after they spawn and then shoot at you. If anybody would help that would be awesome
Last edited by fivehead (2013-02-21 20:41:31)
Offline
Use something along the lines of
glide to x: (pick random (-240) to (240)) y: (pick random (-180) to (180)) point towards [player sprite v] shoot
Offline
sorry, the first block was meant to be
glide (2) secs to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))
Offline
fivehead wrote:
if the player moves will the enemy still point towards the player?
Well it depends on the shooting script that you use. In some cases, yes, though in others, no.
With regards,
ErnieParke
Offline
Hi,
Here is some A.I. cubes, you are welcome to use/modify the scripts.
If you do, please leave credit.
Regards,
CAA14
Offline
Back when I was a n00b programmer, I made this: http://scratch.mit.edu/projects/Firedrake969/2173697
If you want to have them point and shoot, use point towards sprite, then the shooting script.
Offline