35 #define P__PLAYER_DISTANCE 0 //distance to the player
37 #define P__PLAYER_IN_TERRITORY 1 //player in creature territory
38 #define P__PLAYER_IN_RANGE 2 //player in creature attack/act range
39 #define P__PLAYER_TOUCHED 3 //player touches the creature
40 #define P__PLAYER_ATTACKS 4 //player attacks the creature
42 #define P__PLAYER_ACTION 5 //player performs action
71 aiPercepts* _perceptsGlobal;
88 std::map<std::string, aiAgentState*> _vStates;
89 std::string _strCurrentState;
105 void activate(M_BOOL active = M_TRUE) { _bActive = active; }
106 M_BOOL isActive() {
return _bActive; }
110 void reset() { _bInitialized = M_FALSE; }
119 void state(std::string
id);
120 std::string state() {
return _strCurrentState; }
124 void perceive(
unsigned id, aiPerceptData data = aiPerceptData() );
126 M_BOOL isPerceiving(
unsigned id)
128 if( _percepts.find(
id) != _percepts.end())
return M_TRUE;
132 void perceptsClear();
139 virtual void execute(
class laTimer *pt);
Single state of the AI-controlled creature.
Abstract base class for AI agents.
Interface for loadable objects.
Class aiController is an abstract class for behaviours which can be performed by objects.