Enemy AI

2 replies [Last post]
Offline
Joined: 05/26/2013

Hi I'm a high school senior working on a end of the year project in AP Comp Sci. I stumbled upon this site when looking for 3d engines. It's a great site overall with nice tutorials, but I was wondering if anyone could point me into the right direction with enemy ai. I have the move towards my player I am a little confused about an attack method though. If anyone could help that would be awesome, either respond to this thread or hit me up at agentp172013@gmail.com.

Offline
Joined: 12/13/2010
Have you looked at the

Have you looked at the "Zombie Math Hunter" project under the Scene Creator lessons?  The zombie class contains example of enemy AI that you might find useful.  The basic idea is that inside the move() method, you change the object's state based on distance from the player.  The enemy class could have the following states:  "idle", "walk", "attack", etc.

 

Let us know if this is what you are looking for, or if there is something more specific that we can help you with.

 

Jason

Offline
Joined: 05/26/2013
Thanks

 Thanks I thought that might be how to do it looking back on that that seems really simple