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"

Blueprint execution is stopped when arrives at a Delay

Hi, I have a Blueprint extending from Actor class. In Begin Play some function calls are made, but when it arrives to a certain Delay, not the first one, it stops there. It's very weird because using the BP flow debug I see that the previous Delays in this Blueprint are executed and the countdowns are shown when the flow arrives to them, but at the mentioned certain Delay it just stops and the countdown is not shown.

This Blueprint actor is never destroyed, so that's not the cause of the stop. Modifying the Delay time also doesn't show any change. What could be causing this misterious stop? It's UE4 4.2.

Product Version: Not Selected
Tags:
more ▼

asked Jul 11 '14 at 03:18 PM in Blueprint Scripting

avatar image

Albert Espín
992 81 98 361

avatar image DJMidKnight Jul 11 '14 at 05:50 PM

Can you show a screenshot?

avatar image Albert Espín Jul 11 '14 at 08:26 PM

Here it comes:

alt text

Also, this is not inside a flow control loop (they were problematic with delays), but in a Sequence.

avatar image Ben Halliday STAFF Jul 15 '14 at 06:53 PM

Hey Albert,

I've tried to reproduce this but have not yet been able. You mention that this is not inside a flow control loop, and that's the only situation where a delay shouldn't work that I'm aware of. I may need to see what's going on inside the custom function Spawn Short Cactus, as well as what the rest of this Blueprint looks like behind the Delay that's causing the problem.

You mention using Sequence, for example. Are you using multiple Sequence nodes, and is this the only place where a Delay does not work? If you take out the Delay, does the rest of the Blueprint proceed? Thanks!

avatar image Spoondog Jan 04 '17 at 02:51 AM

I've just recently run into this on 4.13.0 - In my game mode I had a 0.05 sec delay that would start but never end. The delay's purpose was to add a break between http requests I was doing - so: when the http request got a result, it would trigger a delegate event, do some stuff, wait 0.05 sec then do another request.

I added print strings either side of the delay - the prior one would print but not the one after. So it obviously wasn't getting retriggered else the prior string would print more than once. I tried to replace it with a SetTimerByEvent but that also never seemed to fire.

In the end I didn't need to have that break between http requests, so I just removed the delay in my case... but it's still a bit unsettling.

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

4 answers: sort voted first

OK, here is the solution: using Tick event instead of Begin Play, with a Branch to filter a bool to avoid repetition, makes the whole thing work as expected. It's a bit puzzling, looks like something unexpected in the Blueprint system, but, anyway, my case here is solved.

Thanks for your help.

more ▼

answered Jul 16 '14 at 07:58 PM

avatar image

Albert Espín
992 81 98 361

avatar image Ben Halliday STAFF Jul 17 '14 at 05:19 PM

Hey Albert,

I'm glad you were able to get it working, but I'm still not sure what would have caused that in the first place. If this issue resurfaces, please let us know so we can continue investigating. Thanks!

avatar image DJMidKnight Jul 17 '14 at 05:27 PM

Well glad it wasn't just me sorry I couldn't help with this before Ben came in glad you got it working.

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

Is this inside a function? You could use a timer to call the Choose spawn Points.

Sorry I cant help further this could be a bug. So you could try to redo this sequence. But to test the theory you would have to delete the sequence and then close and reopen the project. Of course setup the sequence again to see if it still is having the same issue.

If it does you could escalate this to a bug report unless someone else has an answer.

more ▼

answered Jul 11 '14 at 08:55 PM

avatar image

DJMidKnight
1.2k 51 24 51

avatar image Albert Espín Jul 12 '14 at 11:57 AM

Thanks for the suggestion, but delays are used here to delay a continuate set of function calls with inputs and outputs, which SetTimers can't hold.

Also, I used to have this exact structure of Begin Play and all the function calls and delays in the Level Blueprint's EventGraph, where it worked as expected, not stopping at a Delay, but then in this Blueprint's EventGraph (extending from Actor class) the weird problem happens.

Any other ideas?

avatar image DJMidKnight Jul 12 '14 at 05:36 PM

I will research this. I think I had an issue with delays before and did a workaround using a timeline.

avatar image Albert Espín Jul 12 '14 at 08:05 PM

OK, tell me if you find anything new. I'll keep on doing the same.

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

Notes on Delay in blueprints. For a given event there is only one delay timer. When the event gets called and then hits a delay, the delay starts. If another call to the same event happens, while the delay is pending, and encounters any delay in the event, it gets ignored.

For example if you can equip a weapon to the left and/or right hand, and you have an event to equip the weapon, and it takes a left or right flag, and you do a delay after creating the Actor so the actor gets instanced on the clients before equipping to a hand (in multiplayer this would be a rep-notify and you wanted to wait for the clients to get the actor before the rep notify happens), and then to set the player up you make two weapons and equip them, it will fail. The first weapon gets created, and the delay starts. Almost immediately after, the second weapon gets created, and the delay gets hit and ignores the second chain of execution, because the delay timer for the event is already delaying. Then the delay times out, and the first weapon gets equipped, and the second weapon gets ignored and not equipped. This will happen whether there is only one delay node in the event, or one delay node for left and one delay node for right in the same event.

This is the intended design of the event architecture in blueprints.

The solution in our multiplayer VR game is to have separate events for each equip variable that delays and then equips. Like this...

alt text

more ▼

answered Aug 06 '17 at 06:28 PM

avatar image

SND R Keene
988 31 120 113

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

Any ideas?

more ▼

answered Jul 14 '14 at 08:27 PM

avatar image

Albert Espín
992 81 98 361

avatar image DJMidKnight Jul 14 '14 at 11:41 PM

I cant replicate your problem sorry to trouble shoot with.

(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