Saunter
The bot wanders in a zone defined by a point and a radius. More precisely, the bot goes to a random location in this zone, then waits, and chooses another point in the same zone (and loops on this pattern). Use the following Driver's parameters to customize this behaviour :
Saunter_AnchorPoint (Vec3) -> Center of the zone
Saunter_Radius (Real) -> Radius of the zone
Saunter_BaseChillingTime (Integer) -> Time between two moves (in ms)
Saunter_ChillingDeltaTime (Integer) -> Used to add some randomness in the chilling time. For example, if the BaseChillingTime is 1000 and ChillingDeltaTime is 300, the chilling time will be a random value between 0.7 and 1.3 second.
The bot will engage the targets within its AggroRadius, following them and shooting at them until they are out of sight or until the distance between the bot and its AnchorPoint is above its DisengageDistance. The bot then disengages and goes back in a random point in its zone.
i can't quite get it working
here's my code:
Code: Select all
declare Bot = CreateBotPlayer(NullId, 0, S_ArmorMax, BlockSpawns[MathLib::Rand(0, BlockSpawns.count-1)], Now);
InitPlayer(Bot);
Code: Select all
Void InitPlayer(CSmPlayer _Player) {
// Apply bot hehavior
if (_Player.IsFakePlayer && _Player.Driver != Null) {
_Player.Driver.Behaviour = CSmPlayerDriver::ESmDriverBehaviour::Saunter;
_Player.Driver.AttackFilter = CSmPlayerDriver::ESmAttackFilter::All;
_Player.Driver.Saunter_Radius = 100.0;
_Player.Driver.Saunter_BaseChillingTime = 500;
_Player.Driver.Saunter_ChillingTimeDelta = 500;
_Player.Driver.AggroRadius = 50.0;
_Player.Driver.Escape_DistanceReset = 50.0;
_Player.Driver.Agressivity = 10.0;
}
}
i know that the whole bot thing isn't finished yet but in the thread it's written, that the bots DO move around
mine just stay in the spawn and shoot at you if you get in their sight (as usual)
AND Saunter_AnchorPoint doesn't exist
any hints?
