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

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

thanks for your response.

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?

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.

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.