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
If you can help me with this please post an answer.
asked Mar 03 '15 at 09:45 PM in Blueprint Scripting
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 :)
answered Sep 20 '15 at 02:12 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here