Best way to melee atack?

I want to ask, if you know a fine melee attack system. Not just touch and damage, i mean something more realistic : in exact time of the animation the object (swords,knifes or just hands) can damage.

Please, ar there template or a finished fighting game? I just want learn about it.

I want a melee game too, i never find a melee template, here or anywhere else…

I think i get the algoritm to do it, but i want some examples to do better. I’ve reading the Frankie scripts, i learn a lot with that (python too), but that melee attack isn’t the than we are looking for.

Like REALISTIC Melee …?, i see some but didnt looks like something real :slight_smile:

The one i see basically push the enemy back, and plays an animation :confused:

Python will be your friend if you want more exact controls. You can use Python to get the current frame of animation to check for attacks.

Yeah, I think that : in the frameX , the object carried(knife) get the property damage = true until the frameY

I found this video:

Is great example.

do you know if there are a finished fighting game? You are more experienced in this forum

I like to know other things such combos, hitboxs system, character interaction,etc. If there are a finished game i could learn more.


use a rag doll as an enemy, then use animation or something similar to ragdoll. physics for attack

ragdoll can animate with acrioneditor?
or only script to animate?

I would just put a hit box around whatever weapon your character is using, whether it’s a sword or his fists. Then just use a touch sensor to see when it touches an enemy.

You could also do some creative things to determine the amount of damage a hit should do. For example, if you want a sword swing to do very little damage during the begining and end of the animation but have a high damage “sweet spot” in the middle, you could use a timer property. Just start the timer at 0 when the player starts the animation, and when the weapon hits, use the equation <damage delt> = <peak damage> - <peak damage>/(<animation length>/2)^2 * (<timer> - <animation length>/2)^2

Just make sure you don’t deal any damage before the animation starts or after it finishes.

Great idea!