It seems to work when I test it (I just spawn a bot with the Patrol behaviour, put it in Turret mode when I hit it, and put it back in Patrol mode if I hit it again). Could you please give me the script you're using ? Moreover, if I understand well, it worked before the patch, right ?TGYoshi wrote:Latest patch (a few minutes ago) messed bots up. They go idle after setting their mode from Turret back to Patrol. If I set it to Turret after Patrol again it'll act like a turret as expected, but it won't resume it's Patrol behaviour.
The initial Patrol at spawn does work correctly, tho.
About yesterday's update, here is a detailed changelog :
Script API :
- Fixed an issue with bots movements in Saunter mode, they shouldn't be stuck anymore.
- Changed the way a bot disengages an enemy while in Patrol mode : they joins the path as fast as possible, instead of cutting to the next waypoint on their path. This partially fixes an issue with the bots not engaging sometimes, although there seems to be some situations where it still happens. We are still investigating on this issue.
- You can now change the zone in which the bot wanders while in Saunter mode with the variable Saunter_AnchorPoint (Vec3) in the bot's Driver.
- There is a new variable in the Driver called Target (CSmPlayer), which stores the current target of the bot. This target is the closest player on which the bot can shoot (i.e. in the Line of Sight, within the AggroRadius, and that matches the AttackFilter). Note that there is no point in trying to set this target in the script, it is recomputed by the game engine when the bot is updated.
- New AttackFilter value : Nobody. This enables you to create peaceful bots without having to tweak other variables like AggroRadius.
- You can define a set of players that the bot should not target, with the Driver's variable TargetsToAvoid (an array of CSmPlayer).
- New predefined Behaviour : Escape. The bot doesn't attack, it only flees when an enemy is too close, and keeps its current position otherwise. When the distance between an enemy and the bot is lower than Escape_DistanceSafe, the bot chooses a random point located between Escape_DistanceMinEscape and Escape_DistanceMaxEscape meters from its current location.
- You can now move a point of a path by left-clicking on it and dragging it to another location.
- You can now add a point between two other points by left-clicking on the path between these two points and dragging it to another location.