# In melee games do enemies wait for their turn to attack? or do they attack randomly no matter when?

**URL:** <https://forums.unrealengine.com/t/in-melee-games-do-enemies-wait-for-their-turn-to-attack-or-do-they-attack-randomly-no-matter-when/460458>\
**Category:** AI\
**Tags:** ai-navigation, detour-crowd-ai-cont, unreal-engine, question\
**Created:** [January 12, 2020, 12:18am UTC](https://forums.unrealengine.com/t/in-melee-games-do-enemies-wait-for-their-turn-to-attack-or-do-they-attack-randomly-no-matter-when/460458 "2020-01-12T00:18:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AbdelrahmanSaid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AbdelrahmanSaid](https://forums.unrealengine.com/u/AbdelrahmanSaid)\
**Post date:** [January 12, 2020, 12:18am UTC](https://forums.unrealengine.com/t/in-melee-games-do-enemies-wait-for-their-turn-to-attack-or-do-they-attack-randomly-no-matter-when/460458/1 "2020-01-12T00:18:28Z")

</div>

Hi,  
I have been searching for an answer to this question for quite a long time…  
cause it looks pretty natural in games like assassins creed but when you let enemies attack randomly they basically mess it up!  
thanks in advance

---

<div class="post-metadata">

**Author:** ![SithHunter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SithHunter](https://forums.unrealengine.com/u/SithHunter)\
**Post date:** [January 12, 2020, 12:57am UTC](https://forums.unrealengine.com/t/in-melee-games-do-enemies-wait-for-their-turn-to-attack-or-do-they-attack-randomly-no-matter-when/460458/2 "2020-01-12T00:57:43Z")

</div>

It really depends on the game. You’ll have some games that have every enemy as a separate entity that ignores any other enemies around it. Some games may use a simple timer solution that allows enemies to cycle through attacks. You can get group behaviors where a nearly random enemy from a formed group is selected and given the attack priority.

It depends on the other combat mechanics and the game itself as to what solution would best compliment the rest of the design.

AC uses a group solution to allow for group combat to flow.

---

<div class="post-metadata">

**Author:** ![AbdelrahmanSaid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AbdelrahmanSaid](https://forums.unrealengine.com/u/AbdelrahmanSaid)\
**Post date:** [January 12, 2020, 1:21am UTC](https://forums.unrealengine.com/t/in-melee-games-do-enemies-wait-for-their-turn-to-attack-or-do-they-attack-randomly-no-matter-when/460458/3 "2020-01-12T01:21:51Z")

</div>

thanks for your response.

---

<div class="post-metadata">

**Author:** ![presto423](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@presto423](https://forums.unrealengine.com/u/presto423)\
**Post date:** [January 12, 2020, 1:22am UTC](https://forums.unrealengine.com/t/in-melee-games-do-enemies-wait-for-their-turn-to-attack-or-do-they-attack-randomly-no-matter-when/460458/4 "2020-01-12T01:22:08Z")

</div>

You should play Tekken 7 or Soul Calibur 6 to reveal the answer. Joking, it is a variable thing in games. By melee games, are you referring to Double Dragon, Final Fight, Assassin’s Creed, God of War…any game that isn’t primarily based in using guns? One great example to check into is Ninja Gaiden Sigma and Devil May Cry games. Both of those have a range of different enemy attack patterns and initiatives. Sometimes they’ll stand back and wait to be attacked, then defend and counterattack immediately or with a slight pause. Other times they’ll attack as soon as they see the player. They rarely run and hide, though I’ve encountered that too. Where it is not as easy to see is in boss battles. They’re usually appearing to attack based on timing, but also use a ‘waiting game’ approach to catch a player that is highly aggressive and attacks early, or to defend against a strategic player…which is rarer. So in a way, they’re waiting their turn, but also allowing for the difficulty to increase and use the element of surprise. Thanks to fextralife and IGN walkthroughs, surprise is a lukewarm coffee for numerous a player. What is the question about moreso for you?

---

<div class="post-metadata">

**Author:** ![AbdelrahmanSaid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AbdelrahmanSaid](https://forums.unrealengine.com/u/AbdelrahmanSaid)\
**Post date:** [January 12, 2020, 1:51am UTC](https://forums.unrealengine.com/t/in-melee-games-do-enemies-wait-for-their-turn-to-attack-or-do-they-attack-randomly-no-matter-when/460458/5 "2020-01-12T01:51:22Z")

</div>

Thanks for response  
You have reminded me of extra credits youtube channel it usually discusses game mechanics in depth just like you have done.  
Actually, I am trying to make a combat system that is similar to the kylo ren sequence from star wars battlefront 2 (without blocking bullets with your sword obviously) and I was thinking how to make the player feel like a badass but still have the sense of challenge so I am currently thinking of a system where two near-random enemies will have the priority to attack while other will be a little bit far waiting for the chosen ones to be killed or to defend themselves from any unexpected attack from the player.  
will that be sufficient enough or it should be more complex?

looking forward to knowing your opinion.
