mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
getmovedestination, set/get speed, targetting script commands
todo: need to see why getAIController().setAimLocation("10 10 0"); seems to get into an onreachdestination+stuck callback loop
This commit is contained in:
parent
f00b8e1ae0
commit
f3ef698e89
6 changed files with 187 additions and 3 deletions
|
|
@ -183,6 +183,28 @@ void AIController::clearCover()
|
|||
SAFE_DELETE(mCover);
|
||||
}
|
||||
|
||||
DefineEngineMethod(AIController, setMoveSpeed, void, (F32 speed), ,
|
||||
"@brief Sets the move speed for an AI object.\n\n"
|
||||
|
||||
"@param speed A speed multiplier between 0.0 and 1.0. "
|
||||
"This is multiplied by the AIPlayer's base movement rates (as defined in "
|
||||
"its PlayerData datablock)\n\n"
|
||||
|
||||
"@see getMoveDestination()\n")
|
||||
{
|
||||
object->mMovement.setMoveSpeed(speed);
|
||||
}
|
||||
|
||||
DefineEngineMethod(AIController, getMoveSpeed, F32, (), ,
|
||||
"@brief Gets the move speed of an AI object.\n\n"
|
||||
|
||||
"@return A speed multiplier between 0.0 and 1.0.\n\n"
|
||||
|
||||
"@see setMoveSpeed()\n")
|
||||
{
|
||||
return object->mMovement.getMoveSpeed();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_CO_DATABLOCK_V1(AIControllerData);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue