Still chipping away at this. Have overhauled the enemy AI with moderate success:
New vision routine controlled entirely by the game script:
- Game script successively calls all bots telling them if player in range, FOV, and light;
- Calls will not interrupt what bot is doing unless player is ‘visible’ or within flashlight range;
- Bots ignore calls when in the middle of something important that shouldn’t be interrupted;
- As all bot vision is calculated sequentially in one script, there’s no lag from multiple simultaneous calculations;
- This routine allows bots to spot the player almost instantly while using less engine resources;
New touch/dodge logic:
- Bots now decide which bot should get out of the way by ranking importance of their activities;
- Precedence is based on if they’re moving or stationary, in combat or not, or in middle of something that can or shouldn’t be interrupted;
- If both bots decide they’re ranked equally, the game will decide for them;
Tighter logic map:
- Removed several hundred lines of unnecessary code including functions with duplicated functionality or that weren’t called regularly;
- Heavy use of function stacking making script easier to follow;
- Bots now able to work out if their chain has been interrupted/broken, and will start a new chain if this happens (this prevents freezing bots);
I'll make a video showcasing how much tighter the enemy AI is soon

Still to do:
COLLISIONS! ARGH, bumping into other bots works fine - bumping into walls is sadly still messy.
Also on the radar is implementing a ledge-walking mode where you walk against the wall along narrow ledges - should make for some fun action sequences