The bot will search for cover when its current position has been compromised, eg – getting hits too many times in the same position.
Potential cover will have a marker entity placed within the body of the block, the bot will search for nearest marker in the level.
Four beacons will be spawned around the marker, the beacon will perform a visibility test (trace) against the enemy that the bot is trying to evade.
The beacon that failed the visibility test will be marked as a “safe” beacon.
Finally the bot will move to the location of either “safe” beacon.
View of how cover-helper entities (Red coloured thingy) are placed in WED
There are currently 2 different types of cover-helper entities (dynamic and static)
dynamic entities are placed in covers that can be destroyed (Physic object - Newton crate in this demo)
the dynamic entities will poll at a regular interval to check if it is still within a solid object, if not it'll ent_remove(self)