ARTIFICIAL INTELLIGENCE
When initialising a level all enemies are set to a `Prowl` mode as a default, in this mode the enemies wander freely around the level area, searching for intruders. If the player makes any kind of noise, like firing a weapon within hearing range, the enemy will notice and while calculating the easiest route to the origin of the noise and move closer to investigate. Generally, doors are not a problem to enemies, as long as they can be opened and/or unlocked by the current enemy type.
When the player is in combat, some enemies tend to shout for help and thereby draw all security units from a variant radius into the battle field, unless the security units are in `Guard` mode. When the player appears in the enemy's line of view, the enemy will decide what to do considering levels of aggression, health, damage taken, amount of friends available and the distance to the player. Unless the enemy is mortally wounded or just a plain coward, he will go into `Attack` mode where his purpose is to get within firing range and kill you.
If you escape out of sight and don't make any noise, the enemy will continue to follow you in the direction it last physically saw you were heading in. It creates a visual reference (known as a path) to your last visible position. Your path might change direction whilst the enemy is hunting you down, but when it reaches a dead-end it will start backtracking to the place of the last branch and see if it can track you down further.
Occasionally the enemy might decide to retreat, panicking and running away in the opposite direction of your location, it might be a good idea to terminate fleeing enemies as they tend to gossip about your location to other enemy comrades. However you should be aware that the enemies will attack you violently if they have no alternative route away from you. Keep this in mind before chasing the refugee into a dead-end.
As mentioned before some units are guarding important areas of the game. They have a completely different behaviour list, which make them very loyal to their post. However it is possible to set off alarms, which will distract them and make them move away from their assignment but they are always very aggressive when you invade their space.