Gameplay ability works fine the first time but breaks after that

Hello! I am trying to recreate the flashlight mechanic from Luigi’s Mansion. I have set up a “flashlight” with a sphere collider. When the player clicks the left mouse button I activate an ability that waits for a gameplay event and I also activate the sphere colliders generate overlap events. This works great the first enemy I walk up to and click the button, but there are two problems:

  • When I release the button the enemy continues to take damage even though I turn off the generate overlap events for the sphere collider. You can see this in the video on the first enemy I click and release and the DOT continues instead of stopping. My assumption here is that disabling the generate overlap events will trigger the Component End Overlap event - but that doesn’t seem to be happening.
  • When I walk up to the next enemy and click the button, the enemy almost instantly dies and all the damage hit at almost the same time. This instead of it dotting as it supposed to.

Can someone help me understand why these two things are happening so I can try to get this fixed? Or let me know if there is an easier way of doing this lol.

Here is the B_Player where I toggle the overlap events and try to activate the ability

Here is the ability that I created for the DOT of the flashlight

And here is the gameplay effect that I apply to the enemy through the above ability

Anything will help here! Thank you!

Alright, was able to fix it. Here is what I had to do:

  1. The input that was triggering the ability was on “Triggered” pin - this gets called every frame you are holding down the input. This was causing multiple of the same ability to get called, thus stacking the “Wait Gameplay Event”. So when the event was finally received it would apply all the stacked responses at the same time. So switching it to “Started” fixed the every tick problem
  2. Add a tag to the Ability Tags section and also add the same tag to the “Cancel Abilities with Tag” section. This way only one instance of the ability will ever be active no matter how many times you click. Since the ability has that tag it will cancel all previous instances so only the current one ever activates.