Game salad shooter AI
happygfish
Member Posts: 60
Im working on a new project that is a shooter and i haven't made it to this part yet but I would like to be prepared for it. I am trying to figure out how I can make an AI for the enemies maybe make them hoot as the hero gets close so its not too easy for the player but i have not a clue on how to do this please help, and thanks for any suggestions
Best Answer
-
tintran Posts: 453
this example looks at the mouse pointer, if mouse moves close to enemy, enemy will shoot in mouse's direction... you'll just have to work it in with an actor or player's position instead of mouse cursor.
mediafire.com/download/xawbu0lx7rkcgxk/IfMouseGetsCloseShoot.zip
Answers
Are the enemies owls ?
hehe are you asking me or the OP... my enemy has super vision.
oh never mind i think you meant the "hoot" part.
I just learned something interesting about GS, atan(90/0) gives you 90 degrees and atan(-90/0) gives you -90 degrees which is great because it handles undefined values