I made profectiles split after hitting an actor in my 2d game. But child projectiles generate overlap event right after spawning resulting in triple overlap event
What is the best way to work around it?
asked Jan 18 '19 at 05:53 PM in Blueprint Scripting
A quick thing that came to mind is that, if you are not planning to ever hit that actor with the children, you can create a boolean variable called "Child" for example, that would always be false. Then, on the creation of the children you feed each other that their "Child" variable is true. So just tick a branch pass that checks if they are "Child" before checking the overlaps. If they are, then they don't affect the character the parent just hit.
If you feel like you might hit that character again with those children by, say, them bouncing off walls and coming back, then just make a delay at creation, before which they cannot hurt that same target. Then allow hitting it again just in case, after a short while.
answered Jan 19 '19 at 10:08 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here