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"

particle not destroying

so in making a spark effect coming off my sword when it comes in contact with a projectile and one out of like 5 times the particle effect does not destroy a little help on what im doing wrongalt text

Product Version: UE 4.11
Tags:
more ▼

asked May 11 '16 at 05:05 PM in Blueprint Scripting

avatar image

king.cole6891
1 2 3

avatar image Matthew J May 12 '16 at 07:12 PM

Hello king.cole6891,

Is it possible that the sword is colliding with the same projectile (or possible two) very rapidly? If this were to happen within the tenth of a second, it would trigger this event to be called again and reset the timer on the delay just before Destroy Component. This would cause the previous particle emitter to never be destroyed, while the new one gets destroyed instead.

A good way to test this would be to put a print string somewhere in this execution path to see if it outputs multiple times rapidly.

avatar image king.cole6891 May 12 '16 at 07:26 PM

yup that would be the issue any suggestions on how to fix it?

avatar image binse001 May 03 '19 at 07:47 PM

Why does triggering the event again reset the timer? That sounds like a bug

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

1 answer: sort voted first

I'm sure there are other ways than this, but it would probably involve changing the logic entirely. The method I suggest is to use a boolean and a branch. Directly after the OnComponentHit event, add a branch and have all of your existing logic executing off the True pin. Directly after the True execution pin on the branch, add a Set node for a new boolean called something along the lines of bIsNotColliding and set it to False. At the end of your logic, after the DestroyComponent node, add another Set node for that same boolean and set it to True. Lastly, hook up a getter of your new boolean to the branch from earlier.

If done correctly, this should make it so that, even if the Hit event is triggered before the particle emitter is destroyed, the logic will not be triggered too rapidly as to reset the delay.

more ▼

answered May 12 '16 at 07:38 PM

avatar image king.cole6891 May 12 '16 at 09:02 PM

thanks alot got the issue fixed

(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