Make An AI Run For Cover

I am making a shooter AI and i do not understand how to make the AI run for cover when seen by the player. essentially what i need is

  1. make the player run towards the Cube (where he will take cover)
  2. Make him run to the right side of the cube and make this dynamic. (so no matter what direction he runs from he will always be behind the cube facing the player. (cube will be in between of them)

If you can help me with this please post an answer.

Mike

The first thing that comes to my mind is setting (4 or more) fixed targets for the AI to run to, one at each side of the cube.
Calculating which one is furthest away from the player and taking cover there should do the trick.

Another option that comes to my mind when coping with multiple cover possibilities (more than 1 cube/wall/whatever and therefore more than 4 possible targets) is raytracing from the player to the targets and checking for a collission with any object in between to discover if the target position effectively provides protection (since it would be pretty useless to run to the target that is furthest away if it leaves you exposed).

I mean, there are endless possibilities and alternatives with AI: just check out this video that i found googling that appears to use this target system: Tactical AI

Anyways, a combination of these ideas should result in realistic behaviour, even if making an AI behave in a realistic way is extremely difficult. As i said above: the possibilities are endless!

Let me know if this helped and don’t hesitate to ask if you need more advice :slight_smile:

Also, here is the forum thread for the video where they explain some elements:
Thread: Tactical AI ( Cover , Threat and Suppression )

I also found EQS, i suggest you check it out.

EQS