Download

Activating Boolean on Parent Actor BP

So I’m trying to incorporate a sound when an enemy gets hit, and when the punch (normal attack) doesn’t hit anything, in a way they don’t play both at the same time.

After trying a few manners (some which worked, but would later give me headaches) I figured the best one would be to make a global variable on the parent BP “Enemy” and turn it on or off in each of the children accordingly (so if TestEnemy was hit, turn the variable on, and later off).

The problem is that the custom event I have (that is activated through a notify I have on the animations) always goes false, even when the variable turns true, so it never goes through the True branch, and I suspect that this is a matter of timing but I’d like to know if anyone has a better guess.

Here’s the custom event:

Here’s me activating it in one of the children (one of the enemy types) BP:

Here’s when it’s called on the Anim Notify:
https://cdn.discordapp.com/attachments/127723854171734016/352933749190688768/unknown.png

And here’s the timing on the Anim Notify (the E stands for enable, it’s when the collision and the following hit are enabled):
https://cdn.discordapp.com/attachments/127723854171734016/352934149960630273/unknown.png