Hi,
I am trying to think of how to create a way for my enemies to queue up when they are near the player, and wait their turn to interact with the player. A video of my AI not queuing is below:
I was thinking of code such as:
void OnTriggerEnter (Collider other)
{
if (other.GameObject.CompareTag("Player") && if(other.gameObject.CompareTag("Enemy")
{
NavMeshAgent.Stop();
//And change the walk animation a sub state machine with random idle animations
}
}
Do you have any suggestions on how you would try (or have) created a way for the AI to queue up to my player?
As my example code suggests, I am thinking of using OnTriggerEnter, but I am looking for some feedback.
Thanks