On hit/ On Execute Broken

Aeon FitzGerald 2 months ago in Melee updated by Marti (Lead Developer) 2 months ago 5

I have an action on a melee weapon that should only be executed on hit, but its behaving as if its ON execute. 

For example, on hit it should take away health from the player, but instead,  it takes away health even at a far distance, as if the action is on execute. 

Unity version:
Game Creator version:

Hmm this sounds like a bug. I believe the On Hit action is quite new so there might be something wrong. I'll circle back when I have news on this!

Hi Aeon. I've been trying to figure this one out, but everything seems to be working fine. The On Execute actions have the Invoker as the "attacker", while "On Hit", which only happens when the weapon hits something with a Character Melee, has the Invoker as the hit object.

I'll take a more thorough look this afternoon, in case a weapon with a big collider might register the player itself as a target of the attack, but I think I already covered this case. If you have anything to add that would help us narrow down the problem, please let me know :-) Cheers!


Would it be possible to add another contextual entity like the invoker (ie. target) and have both the attacker and a target within one action, so more complex formulas that are based on both attacker and target stats would be possible without using OnAttackReceived event?

Yeah that'd be cool.


That's something I'm looking into in fact. I don't think it will be possible for the current version of Game Creator, as everything is tightly coupled. However, for the next major iteration, I'm thinking of ditching the "Invoker" and replace it with two new entities: Self and Target. Apart from being names that make much more sense, it will make interacting with the world easier.

Please, do let me know if you have further ideas on this. I'm struggling to see if with just these two it will solve all (most) problems, but I'm still looking into other solutions :-)