x

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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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?

alt text

Product Version: UE 4.21
Tags:
more ▼

asked Jan 18 '19 at 05:53 PM in Blueprint Scripting

avatar image

Sraf42
14 1 1 4

avatar image Sraf42 Jan 18 '19 at 05:56 PM

I should add that the split is fine, but it generates triple event in actors BP (e.g. triple damage and points)

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

1 answer: sort voted first

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.

more ▼

answered Jan 19 '19 at 10:08 AM

avatar image

ErtieZone
26 3 5

avatar image Sraf42 Jan 19 '19 at 11:46 AM

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.

Yeah, this basically what I came up with with. Can you please say how you would do it? I decided to create a new boolian in child blueprint which is false by default, and is set true in event begin play after a delay. Than in actors blueprint it checks for this boollian before doing all the overlap events.

(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