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. 

Ensuring the execution of an event when it is executed multiple times?

Hi everyone,

I've been playing around with the following Blueprint:

alt text

To summarise, whenever an actor is hit by a line trace (raycast), a MID is created, a MID parameter is changed, and then after a delay, the MID parameter is reset. Everything works as intended. However, if the event is executed (again) before the delay duration (2 seconds), the MID parameter doesn't get reset. Ultimately, I'd want the event to be queued so that all of the MID parameters get reset, regardless of how many times the event is executed. I've tried converting the "HitComponentColour" variable to an array, and although the array gets added to successfully, I was still unable to make it function correctly.

Any help will be greatly appreciated. Thanks!

Product Version: Not Selected
Tags:
more ▼

asked Feb 02 '15 at 10:16 AM in Blueprint Scripting

avatar image

Ben85
111 7 8 15

avatar image RAVaught May 20 '15 at 07:32 PM

Right now, the delay nodes are the only sure way I know of making that happen. However, it might be possible for you to build a queue in your BP. Create an array on the actor, as the hits come in, add the relevant info into the array. In your MID processing BP here, put a bool called processing. When the process fires, set the bool to true, when it completes, set it to false. Toss an IF branch in at the beginning so that it only fires if processing is false. At the end of your code, remove the index from the array that you are processing and pull the next one. etc.

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

0 answers: sort voted first
Be the first one to answer this question
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