CHASING:
The enemy will [CHASE] the player at their move speed to close the distance until they reach the player's [WAITING] range.
Enemies will [CHASE] the player any time they leave the player's [WAITING] range
What triggers it?
[CHASING] is triggered whenever the enemy is on the map, and is not currently in the player's [WAITING] range, [REPOSITIONING], or [ATTACKING].
What ends it?
The enemy reaching the player's [WAITING] range ends the [CHASE] state.
WAITING:
The enemy will [WAIT] to [ATTACK] the player as only 5 enemies can [ATTACK] the player at once.
The enemy will stay in the [WAITING] state until there is an open [ATTACK] slot and is chosen for said slot.
There is an [ATTACK] queue that can hold up to 5 enemies that can [ATTACK] the player at one time.
The queue will choose an enemy at random inside of the player's [WAITING] range as many times as it can to fill all slots in the queue.
This queue does NOT exist for RANGED enemies.
What triggers it?
[WAITING] is triggered whenever the enemy is within the player's [WAITING] range or if the enemy is [REPOSITIONING] for longer than 10 seconds.
What ends it?
[WAITING] ends when the enemy moves out of the player's [WAITING] range or if the enemy is chosen to [ATTACK].
REPOSITIONING:
When an enemy is chosen to [ATTACK] it will [REPOSITION] towards the player at its move speed until the player is within the enemy's [ATTACK] range.
The enemy will [REPOSITION] until it reaches the player or if 10 seconds have passed.
What triggers it?
[REPOSITIONING] triggers when an enemy is chosen to [ATTACK].
What ends it?
[REPOSITIONING] ends when the enemy has reached the player and starts to [ATTACK] them, or if the enemy has been [REPOSITIONING] for over 10 seconds.
ATTACKING:
When the enemy reaches the player and is in range to [ATTACK], the enemy will start its [ATTACK] animation in an attempt to harm the player.
The enemy will [ATTACK] once when its [ATTACK] range overlaps with the player.
What triggers it?
[ATTACKING] triggers when the enemy's [ATTACK] range overlaps with the player.
What ends it?
[ATTACKING] ends when the enemy's [ATTACK] animation in finished.
AIMING:
The enemy will take [AIM] at the player, readying a shot.
The enemy will aim for 3 seconds until it either [ATTACKS] or [REPOSITIONS].
What triggers it?
[AIMING] is triggered after every time the enemy [REPOSITIONS] or [ATTACKS].
What ends it?
[AIMING] ends when the enemy decides to either [REPOSITION], [RETREAT], or [ATTACK].
REPOSITIONING:
The enemy will [REPOSITION] to a different spot to attempt to have a better sightline.
The enemy will [REPOSITION] 5 meters in a random direction at its move speed to try to get into a better position.
What triggers it?
[REPOSITIONING] is triggered whenever the enemy [AIMS], and cannot see the player.
What ends it?
[REPOSITIONING] ends whenever the enemy has finished moving 5 meters or if the enemy [RETREATS].
ATTACKING:
The enemy will [ATTACK] the player, typically with a projectile of some sort, directed at the player's position.
The [ATTACK] of ranged enemies has infinite range but is easier to dodge.
What triggers it?
[ATTACKING] is triggered when the enemy has [AIMED] at the player and has an unobstructed shot.
What ends it?
[ATTACKING] ends when the attack animation is over, or if the enemy [RETREATS].
RETREATING:
The enemy will [RETREAT] at their move speed to get away from the player.
The enemy will [RETREAT] until it is sufficiently far away from the player.
What triggers it?
The enemy will [RETREAT] when the player is within 2 meters away from them.
What ends it?
The enemy will stop [RETREATING] when the player is more than 2 meters away from them.
DEATH:
When an enemy reaches 0% health or below the enemy dies and ragdolls to the ground.
What triggers it?
Enemy health reaches 0%.