Logic brick ai?

How do I do this?

Finite State Machine (FSM). Use the logic brick states, each state would represent a state (who would of guessed?).

Something like:
-State 1: Idle
-State 2: Wander
-State 3: Suspicious/Looking for player
-State 4: Attacking player
-State 5: Running from player
-State 6: Dead

So you make all the actions for each state, like attack would be track to player + movement, when close enough attack it attacks.

Then you need to make conditions or transitions between states. E.g. In the idle state if the bot sees the player it changes to attack state. If the bot is in attack state and it is getting really badly owned, it changes to run state.

However, this isn’t a walk in the park with logic bricks. Something like this is best coded in python.

If you really want to you might look at this post where someone did AI almost entirely with Logic Bricks but you’ll need to ask for an explanation of all the bricks: http://blenderartists.org/forum/showthread.php?t=165690

you could creating an enemy (stationary)turret for start and then move to something like… security bots like the ones from bioshock

Thanks, now I need to get an explanation for all these logic bricks.:spin:

All these logic blocks? The primary one you’ll be using is the state actuator to switch
from state to state…You can set up whatever sensor you want to trigger it… :stuck_out_tongue:

No, I was just jokin about the link JayDez posted.