Unknown

From DarkAI

AI GET ENTITY STATE$

This command gets a string description of the current state which is controlling the entity. In automatic mode the entity is controlled by a finite state machine which contains a set of states each with a different behaviour. An entity switches states depending on its surroundings for example the 'attack' state is used when the entity spots a target. This command can be useful to see why an entity is doing what it is doing.

The states that can be returned are:
Manual – The entity is under manual control and will not do anything itself.
Idle – The entity has nothing to do and will return to its idle position.
Patrol – The entity will patrol its patrol path.
Go To Destination – The entity will move to its destination.
Investigate – The entity has detected something (e.g. a sound) and will investigate it.
Attack – The entity has spotted a target and will attempt to attack it.
Run And Attack – The entity has spotted a target and will move towards it.
Strafe And Attack – The entity has spotted a target and is moving sideways.
Defend – The entity is will return to its defend area.
Search Area – The entity will check a possible path a target could have taken.
Wait In Cover – The entity will duck behind available cover and wait to pop up and shoot.

Syntax
return string = AI Get Entity State$ ( Entity Number )

Parameters
Entity Number, The id of the entity to check.

Return
A string representing a description of the state.