Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Event ActorBeginOverlap not firing at times.

Hello everyone. I created a very basic damage function for a spell. However, when I cast a spell directly on a target, it sometimes doesn't continue the loop I created below, but always deals the first tick of damage. When I lead the target into the spell zone it always works without a problem. Is there a better thing to use than "Event ActorBeginOverlap" for this particular issue?

Applying damage Applying damage Setting damage Setting damage

Thank you in advance for any advice!

Product Version: UE 4.13
more ▼

asked Oct 26 '16 at 08:28 PM in Blueprint Scripting

avatar image

11 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

This really depends on the spell. If it penetrates and thus moves on it can be outside the body before your next iteration.

Instead I would do something like add a damage debuff with a timer that ticks in the actor that is hit or use a line trace instead.


more ▼

answered Oct 26 '16 at 08:53 PM

avatar image

2.7k 107 35 180

avatar image WestelRay Oct 26 '16 at 10:09 PM

Those options aren't very viable for a ground targeted spell. Most of the spells are going to be based on non homing mechanics. Therefore, I need an answer rather than a workaround solution, which yours are valid for a different system.

Would you know a better way to handle specifically actor collision rather than "Event Actor(Begin/End)Overlap"?

avatar image NoobsDeSroobs Oct 26 '16 at 10:22 PM

My answer is not really a workaround as I only gave you alternatives. I have no idea what the spell is supposed to do, how it works and what can affect it. You have to explain the exact usage and mechanics of the spell and the situation in which the problem arose. then I can help you more precisely.

avatar image WestelRay Oct 27 '16 at 12:38 AM

I understand, and yes, they are alternatives. I made a video that might help you pinpoint the issue visually, and I try my best to explain the issue in the video as well.


avatar image NoobsDeSroobs Oct 27 '16 at 03:20 AM

This made it a lot clearer thank you. And also quite weird. There are two methods that come to my mind right away:

First, you can try to poll using GetOverlapingActors. Every time you tick the damage spell you call that node and apply the damage to all actors returned by it. Naturally, this can be heavy if you are going for a horde style game with many AOE spells and many characters. You can store each actor upon entering using OnActorBeginOverlap and remove them upon leaving and then simply send the damage to everyone in that list.

The second method is to reverse the problem. Upon entering the volume you get a timer and a damage debuff. Then you handle the damage yourself. Upon exiting the volume you simply remove that damage debuff and thus dont take any damage anymore.

As for why you are getting this problem. I believe it is because of how the engine handles overlap. Try placing the AOE spell such that it does not hit you and only the drone. Does that work? It might be attacking you instead. That being said, overlap detection during spawning is a bit finicky.

My engine is updating at the moment so I cant provide you with examples right now, but I will try to update my answer with screenshots when ready.

Please feel free to ask if you have any questions.

avatar image WestelRay Oct 27 '16 at 03:30 AM

You hit it on the head. I'll try GetOverlapingActors in the morning, it's a bit late here. Yet, the enemy unit takes full damage if I'm not in the circle with it when it is standing still. Either way, it only registers one unit as taking damage at a time which is definitely not what I'm looking for.

avatar image NoobsDeSroobs Oct 27 '16 at 03:34 AM

Good luck tomorrow. Also, I wanted to say this because it is a trait I feel we are missing on the answerhub: Thank you for being civil and properly informing us when asked to. A lot of people get cranky and give unclear and half-hearted explanations. That earned you my good will and some upvotes. :P

avatar image WestelRay Oct 27 '16 at 05:22 PM

Well, students aren't know it alls, otherwise they'd be teachers. The fix of using Get Overlapping Actors works wonderfully. Now just to set classes to define ally/enemy ect. Different thing though. However, if anyone is looking for a fix I'll leave the blueprint here. Thanks for the help again!

[1]: /storage/temp/112753-applydamagefix.png

applydamagefix.png (141.6 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I would also use a timer like NoobDeScroobs said. But first can you try using this setup, and tell me if anything changes?

alt text

capture.png (121.5 kB)
more ▼

answered Oct 26 '16 at 10:36 PM

avatar image

Night Watcher
1.7k 44 12 71

avatar image WestelRay Oct 27 '16 at 12:36 AM

That returns the same issue I had before. It works exactly the same though. As I'm having a little trouble explaining the problem. I made a video which may help explain it better.


Not sure if that is enough input to try to figure out my most likely silly error.

avatar image Night Watcher Oct 27 '16 at 03:43 AM

I understand you want to fix your code issue, and I'll try to help you with that, but on a side note there is something in UE4 pain causing volume, you might want to check it out https://docs.unrealengine.com/latest/INT/Engine/Actors/Volumes/

avatar image Night Watcher Oct 27 '16 at 03:49 AM

it looks like you damage is only applying once and not looping. The only reason why it's continuous when you move, it's because your actor is overlapping and un-overlapping over and over again while you move. The issue is definitely due to how damage is applied, so that should narrow it down. You can either try to use a while loop with break or a branch instead of gate, but yeah a timer would be best. To make sure if it's the gate issue, try connect the delay output directly to the apply damage input. This will create an endless loop, and UE4 will stop the game to break out of the infinite loop, but at least we will know if it's working

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question