Enemy Patrol Problems

I am constructing an AI method for a first person shooter and would like to understand how one could set up an object that patrols that is also dynamic without using an animation.
Any Ideas?

Hi, this is my guess:

  1. Have patrol spots (empties)
  2. Have an AI state property (idle, patrolling, attacking)
    You can do a logic brick approach or a python approach.

My logic brick approach will be something like: have a track to actuator in my AI player for each patrol spot, and link these actuators to property sensors. Initially set the AI player’s “patrol to” property to the first patrol spot. The logic will make the AI player move to that spot. Everytime the AI reaches a patrol spot a property actuator will change the property “patrol to” to the next patrol spot, so the next set of patrol bricks will be triggered.

Whenever the player (human) comes at a certain distance of the AI player, have the AI state property change to “attacking” so the patrolling actions will be overriden and a set of attack sensors and actuators will take place.

It’s a neat idea :wink:

Where are the state propertys and how do they work? :-?

Go here and search for “WayPoints.zip”. Maybe this will help You.

Thanks everyone!

And for future referance I found that a way point could move to another frame in its location ipo when it is approched by the patroling object using the property option in the ipo actuator.
I hpoe this helps other people as well.

and that’s an example of apython implementation(simple huh?), thanx for the link Doc!

I meant having a property for your object called “state”, so that the logic bricks or a python script will check the “state” property to act accordingly…

state == “patrol”:
(do patrolling stuff)
state == “attack”
(search and destry)

hope it makes more sense now

Actual, I already had that nailed down…
Thank you anyway.

im studying python too

can you write a small tutorial yet

Yeah, it is a good asset in making games w/ blender.

I will make it one onf my all time goals…
No, really.

I shall get on it write away (bad pun intended).

:o Then the Ai attack the player and if the player succed to escape without killing the AI, what did the AI do? standing there or going back to the patrol?