AIClient
Private Types
_Anonymous_ { FireTrigger = 0 JumpTrigger = 2 JetTrigger = 3 GrenadeTrigger = 4 MineTrigger = 5 }
Parent
Public Types
_Anonymous_ { ModeStop = 0 ModeMove ModeStuck ModeCount }
Private Attributes
Private Functions
throwCallback(const char * name)
Utility function to throw callbacks.
Public Functions
AIClient()
Constructor.
Destructor.
clearAim()
Clears the aim location and sets it to the bot's current destination so he looks where he's going.
DECLARE_CALLBACK(void , onConnect , (const char *idString) )
getMoveList(Move ** movePtr, U32 * numMoves)
This method gets the move list for an object, in the case of the AI, it actually calculates the moves, and then sends them down the pipe.
Returns the target object.
This method is just called to stop the bots from running amuck while the mission cycles.
setAimLocation(const Point3F & location)
Sets the location for the bot to aim at.
setMoveDestination(const Point3F & location)
Sets the location for the bot to run to.
setMoveMode(S32 mode)
Sets the movement mode for this AI.
setMoveSpeed(const F32 speed)
Sets the speed at which this AI moves.
setMoveTolerance(const F32 tolerance)
Sets how far away from the move location is considered "on target".
setTargetObject(ShapeBase * targetObject)
Sets the object the bot is targeting.
Detailed Description
Private Types
@178
Enumerator
- FireTrigger = 0
- JumpTrigger = 2
- JetTrigger = 3
- GrenadeTrigger = 4
- MineTrigger = 5
typedef AIConnection Parent
Public Types
@179
Enumerator
- ModeStop = 0
- ModeMove
- ModeStuck
- ModeCount
Private Attributes
Point3F mAimLocation
bool mAimToDestination
Point3F mLastLocation
Point3F mLocation
Point3F mMoveDestination
S32 mMoveMode
F32 mMoveSpeed
F32 mMoveTolerance
Player * mPlayer
bool mTargetInLOS
SimObjectPtr< ShapeBase > mTargetObject
bool mTriggers [MaxTriggerKeys]
Private Functions
throwCallback(const char * name)
Utility function to throw callbacks.
Public Functions
AIClient()
Constructor.
~AIClient()
Destructor.
clearAim()
Clears the aim location and sets it to the bot's current destination so he looks where he's going.
DECLARE_CALLBACK(void , onConnect , (const char *idString) )
DECLARE_CONOBJECT(AIClient )
getAimLocation()
getLocation()
getMoveDestination()
getMoveList(Move ** movePtr, U32 * numMoves)
Reimplemented from: AIConnection
getMoveMode()
getMoveSpeed()
getMoveTolerance()
getTargetObject()
Returns the target object.
Object bot is targeting
missionCycleCleanup()
This method is just called to stop the bots from running amuck while the mission cycles.
onAdd(const char * nameSpace)
What gets called when this gets created, different from constructor.
setAimLocation(const Point3F & location)
Sets the location for the bot to aim at.
Parameters:
location | Point to aim at |
setMoveDestination(const Point3F & location)
Sets the location for the bot to run to.
Parameters:
location | Point to run to |
setMoveMode(S32 mode)
Sets the movement mode for this AI.
Parameters:
mode | Movement mode, see enum |
setMoveSpeed(const F32 speed)
Sets the speed at which this AI moves.
Parameters:
speed | Speed to move, default player was 10 |
setMoveTolerance(const F32 tolerance)
Sets how far away from the move location is considered "on target".
Parameters:
tolerance | Movement tolerance for error |
setTargetObject(ShapeBase * targetObject)
Sets the object the bot is targeting.
Parameters:
targetObject | The object to target |