Simultaneous Hit Reaction with GAS

Hi, I’ve been learning UE for about a year now and it’s my first post here but I can’t seem to find the solution myself this time.

I’m buidling a Beat’em up game and I’ve been struggling with an issue when hitting several ennemies simultaneously with an AOE or with multiple trace hitbox. For context, I’m using the Gameplay Ability System and the system works as follows :

  • When I press the button, the ability is called and the anim montage plays. It has a first notification that starts the hit scan (a timer and an event) and another one that ends it. Depending on if the type of move, the hitbox will be a sphere AOE or a capsule shape that follows a specific body part i’ve set on the ability.
  • When the hitscan detects a new target, it deals damage on his HP using a custom execution class.
  • But he also starts building up a “knockback value” using another custom execution class, and if it exceeds a certain attribute, the ennemy starts being knocked back (pushed a little and playing his KB animation).

Now the issue is that if i successfully hit more than 1 ennemy with the same ability, only the last one to be processed will actually play the animation and be knocked back.

The thing is, i can say with 99% certainty that ALL the ennemies that were hit do actually receive correctly every step of the process. They take their damage, they properly accumulate knockback value, they receive the event and do try to activate the knockback ability (but they silently fail), and they can even identify themsleves properly every step of the way.

I’ve tried moving the animation logic out of the knockback ability and put it in the ennemy class while calling from the ability but It behaved the exact same way.

I’m using custom metahuman classes and i’ve been upgrading my version to 5.7.4 from 5.6.1 recently and it broke some things but nothing i couldn’t work arount. I hope its nothing like that.

I’d be happy to provide any more details and screenshots if needed.

Thanks for reading and i hope someone actually understands what’s happening.

This is very strange indeed. Try to isolate the problem as much as possible.

Make the KB ability print the KB value on screen and say how it goes.

Figure out if the ability is not activated or just the animation is not played. This leads to several other the questions:

  1. Are we talking about single or multiplayer?
  2. Which object triggers the ability, how and when?
  3. What happens if you try to activate the KB by a key press on a list of those actors?
  4. Is it possible that the ability is somehow interrupted by another ability?
  5. Are there any requirements to activate that ability?
  6. Can you think of another part of your game that mihgt prevent you from playing an animation or activate an ability?
  7. Why is the knock-back an ability and not just a GameplayCue?

I’m quite positive that this won’t solve your issue but answering those questions might help you narrow it down at least a bit. (I hope)

Thank you so much for giving a few minutes of your time !

your advices helped me and by trying each point one by one i was able to pinpoint the culprit eventually. and it’s was something that i didnt bother mentionning because I didnt realise how important it was : just before I applied the knockback and the damage i was applying a short prototype of a hitstop function to the target actor.

i don’t really understand the intricacies but it was what was messing up the whole thing. I should have known that the delay would interfere. I’ll figure out how to do it properly later.

That reminds me how i’m very far from being done with learning.

Again thank you very much for your time, it really helped.

PS: Also the knockback couldn’t be a gameplay cue because it isn’t purely cosmetic, knockback is supposed to be a core mechanic in the game.

The target actor pin on the hit stop is not plugged in.