Melee: Being attacked even when my weapon is not out ?

Dornano 5 months ago in Melee updated by Marti (Lead Developer) 5 months ago 3

When the Player has his weapon out (draw), I get hit by ennemy, that's good. But when my weapon is in (sheathe), I don't receive the enemy attacks (see video).

How should I fix this?

2020-05-24 14-37-06.mp4

Unity version:
Game Creator version:
Satisfaction mark by Dornano 5 months ago

Inside a Melee clip, at the bottom, we can add some "On hit" actions, and those Actions works also when the Player doesn't have his weapon out. But I don't think it's a really clean way to do it. Also, even when my Player is supposed to be dead, these "On hit" Actions continue...


You could also add an empty melee weapon as a placeholder, or perhaps a punching/karate weapon. If it's a placeholder, you can just have an empty prefab and equip it when there's nothing else equipped, as a default. That way, you don't have to edit the "On Hit" for every weapon.


Exactly. The Weapon Asset contains all the reactions. If a character doesn't have a weapon drawn, it can't react to attacks. You can create a "Empty Handed" weapon that has no attacks but has hit reactions and is enabled by default.