Trying to set up a basic Melee Damage system

CTheC 6 months ago in Melee updated 6 months ago 6

Hello I just bought game creator and the melee kit, sadly I'm not a programmer but I have managed to do a great deal with the kit already, custom animations and models, all really easy, I love it!

Now I am ready to make my first basic concept for a game, two people fight, one dies, the game is over or you move on to a new scene with a harder fight.

The downside is right now I can't figure out how to give a character hit points or health?

What would be the quickest and simplest way to do this do you think? I am willing to buy any of the other addons if that is easier. 

Its very simple what I need, both characters to have 100 health, when you get hit by an attack you lose X health (based on what the attack is, like the block system) 

How would I go about doing this? Right now the melee hit system seems to be set, and you can't add another variable to what happens when you are hit.

Unity version:
Game Creator version:
Satisfaction mark by CTheC 6 months ago

I I've picked up the stats plug in too and I have it to where if an attack hits, you lose health, the issue is that means hits anything, not just the target and you lose health no matter what, could really use a nudge in how to work this together as I'm lost, happy to pay for the help at this point, I'm going mad haha

I agree, I just picked up all these great assets from the spring sale and while they work great, trying to figure out how to apply basic damage with the Melee Damage component with a weapon. Would be nice to have a weapon component to calculate formulas for damage and not just use the poise system.


I am not sure if this is optimal in doing it this way, but I was able to get something to work. I added a tag to the enemy and just named it "enemy" and then on my actual weapon/sword I added the following components kind of like the fireball from the stats example. The formula is nice as it can be adjusted for damage calculations per weapon. Again not sure if this is a proper way of doing it but it is working.


I sadly can't get that to work maybe im miss understanding what you mean by the actual weapon. 

Hopefully the dev sees this to help

As right now I'm just using an else

If statement to ask if the player is blocking or not if he is deal no damage if he's not deal 20

So what I mean is you have to add the components from my previous post to the actual weapon model and not the weapon inspector that sets up the combo's and hit and weapon information. You can get to the weapon model prefab and create your own look by selecting what I have highlighted in the image below.

I do have an issue and again this is probably not the "proper" way to do it but it's the only thing I have been able to get to work so far. See my video below and you will see what I mean. I can swing and deal damage but also if my weapon just collides with the enemy it deals damage which should not happen. Trying to find a better way still.

Click to see example here: Combat Test


Hey! I'm preparing a youtube tutorial that will cover this in depth, but here's the idea: Add a "On Receive Hit" Trigger on each character. This action will be fired each time a character attacks the other one. You can subtract health using the "Attribute" action.

To detect when the character dies, use another Trigger "On Attribute Change" and set it to "on decrease". This will fire every time the character's health decreases. Use a condition to check whether the health value is equal or less than zero, and if so, play a death animation, or put on a gameover/win screen.

Hope this helps!

Thats what I've done already but that also means you can't change the damage per attack or if there's more than one enemy per enemy, its not as in depth as the poise or defence system is which will make it seem oddly flat and out of place in a full game.