How To Make Basic AI?

Okay, so I have a first person shooter set up, with a map and a character, with animations, grenades, multiple guns, etc. I am NOT using the MachineGun.js script unity includes in there FPS tutorial. I wrote the whole script from scratch myself. I am using a lot of the assets from the bootcamp demo, and I want the enemies to be the soldier you play. I have the model setup, and I have all the animations. All I want to do now is have him stand there (or possibly patrol a path), and when you get within a certain distance from him, he will maybe run and hide, then a few seconds pop out and start shooting, or something. The games pretty much finished except for enemies. you can pick up ammo, and there are plane crashes and stuff like that, so I want it to look good. Possibly, could someone explain how to use Behave (and exactly how it works), because I can't find any good tutorials. (Also, I already have it installed and ready to go. Its version 1.12 I think)

As far as I know, Behave is just a drag and drop solution to easily create finite state machine structures, but you still have to code by hand the actual behaviors that are supposed to occur in each state.

I would dissect the AI scripts from the various tutorials from the resources section of, both the 3rd person platformer and the FPS tutorials have basic AI behaviors that can get you started with a basic patrol/chase/attack bot.

If you want to learn how to make a great game AI, read Programming Game AI by Example. The book is geared toward creating First Person Shooter behavior.

As mentioned above, you can use the scripts from the Unity FPS tutorial. I have created a FPS game and used the scripts on my AI and it's great.

The scripts are "AI (which automatically assigned a character controller), AIanimation (which allows the AI to animate) and you can also assign a damage receiver or something. It's all there in the tutorial, all you have to do is drag and drop.

It also has a waypoint finder, you only move the waypoints around and the AI will follow automatically.