Delayed Execution Collection

JasonJonesLASM 4 years ago updated 4 years ago 10

This is a series of delay style units, that stop flow under certain conditions.

Wait - Delay execution by a specified time.

Wait For Next Frame - Delay execution by 1 frame.

While Yield Loop - Delay execution while a condition is true. While it is true, set something to happen every frame.


Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

I was looking for something like this.  Thanks!  Newb question - how to I get the into Bolt to use?

You would simply drag the assets right into your graph. One of the great things about macros. 


Very clever :) But you all convinced me, wait units will make it into the next version. See this post for details:


I like the sound of that. Native will always be better.


Super!  I really needed this functionality.

Download has been updated.

  - Fixed: Added a is defined check for the instance scene variable for each delay type.

  - Wait For Next Frame is no longer broken. All units should work as intended.

Let me know if  there are issues. Hope this works out great until we get a native solution. I'll look into a way to nest my while loop. This will become more of an alternate solution to use when certain functions of the new delay types aren't sufficient in certain use cases. The native ones will always be faster then these though. So use those when it's available most of the time.

I'd like to change how I am setting the ID though. Is there a way to get some sort of instance ID of the current macro? Right now, everytime you enter the state, weither it is the same version or not, the instance ID gets raised by 1. I'd like each macro to always be the same, tied to the macro instance if that is possible.

I'm also looking into being able to stop each of these units prematurely with a control input that reaches to the State Unit.

I made myself similar units, but with one addition, an "unscaled" bool.  Would highly recommend!

Nice. Will look into that! About wrapped up on a big update. Pause, Resume, Stop, and Nest While Yield Loops and Wait Loops. Figured I'd go nuts, since Lazlo has the basic coming. Probably redo some of the innards of the units when it's all available, since its visually kinda bloated looking. Speed it up and clean it up.

I've tested these Macros.  it works!!!


New Update v1.1 - 

  • All macros have been remade from scratch to utilize the native Wait Until and Wait While, so all keys will be incompatible and break. This won't happen again. I am sticking to the Bolt terms from now on.
  • Added Macro: Wait While Loop 
  • Added Macro: Wait Until Loop
  • Added Macro: Wait For Seconds Loop
  • All macros have a looping body.
  • Removed Macro: Wait For Next Frame - Use the native one. 

* Nesting is still not supported. I do have one that works with unlimited nests, but still testing it out as there is something I haven't figure out with running them after complete and on start. It's much larger in structure then these, and does more per frame calculations. It does pause, resuming, stopping, and more. Not sure, but I'm willing to let others look into it if you want.

Newest Version


Previous Versions