Making an anatomy of an attack (melee combat)

Hello there!

I am working on a melee combat game similar to For Honor. See

So, I have watched an RDC video about melee combat which is (Roblox Developer Conference 2018 - Melee Combat: Design and Tech - YouTube)

In the video, I found this.
Screenshot 2021-10-23 at 3.13.40 PM

Right now, I plan to use raycastHitBox Module made by Swordphin123 and make the hit detection client sided. The problem is, I cant wrap my head around this.

This is my idea so far:

i) Player 1: Does attack animation, pass remoteEv(Warning) to Server and fire to player 2
ii) Player 2 : receive remoteEv, Updates GUI
iii)Player 1: Attack hit player 2 , fire remoteEv to Server
iv) Server : Check distance between player1 and 2, fire remoteEv(askReaction) to player 2
v) Player 2 : fire remoteEv to server ( I blocked it! )
vi) Server : Receive reaction from Player 2, check if the reaction is valid with sanity checks
vii) Server : Give damage to player 1, Send remoteEv(playStaggerAnim) to player 1,
viii) Player 1 : Plays stagger animation

These are my questions :

  • How do I detect the other players reaction properly? parry, block, dodge
  • How do I make a time window to parry?

I am very sorry if this seems confusing to you,I am trying my best to explain it to you guys. If you need more elaboration, I will gladly try to do so. If you are confused, I am more confused. If you have a better idea, please tell me.

2 Likes

Sorry for the bump. This is a huge roadblock and a tall hill for me to overcome. Can I please have a little push?

What do you mean by a time window to parry?

In For Honor, you will parry someone if you press heavyAttack right before their sword almost hits you. The window is the time before the sword hits you, it could have a 2 or 3 second window.
So, I want to know how to calculate that window to pass it to the Reaction remoteEv(refer above,step v)

My idea was to make a keyframeReachedSignal event on the attack animation to start the parry time window. But I can’t seem to connect the dots on how to link it to player 2. How do I know if player 2, presses heavyAttack at the right time?

I am sorry if this seems confusing, I might just try what works.