A downloadable Plugin

Download NowName your own price

Asynchronous Functions in Construct 2, with simple Stack State and timing control. 

V 1.1 Updates

The internal function running engine has changed quite  bit with this release. 

  • The system now stores "Stacks" for the functions, that allow 
    • shared properties between Functions called consecutively (for shared state between functions, over time using the getProperty(*name*) expression.
    • as well as an Await condition that makes the function wait for the completion of other functions before calling the rest of it's functionality.
  • Modify Function Parameters for mutating function state over time

V 1.0

There are 3 main actions:

  • Enqueue Function: Adds the function call to a cost  based queue. When the plugin determines there is bandwidth to run the function, it will be called. This allows you to prioritize some functions, while also ensuring that not too many heavy computations happen at once. The system automatically balances and optimizes performance without leaving any functions dangling. 
  • For Function: A function that is called every tick, from a specified Start to End, as if the built in for loop and function call were merged. 
  • Do-While Function: A function that is called every tick until it is broken out of using the Break Loop action, as described below.

And 2 utility actions:

  • Stop Loop: Breaks out of the current For/While loop. Works the same as System->Stop Loop, just with "proper" naming. 
  • Delay: Delays the next iteration of the current loop by n ticks. 

Coming soon

  • Replacement of the basic Call Function that creates a Async Stack Runtime to use IsAwaiting to wait to perform functionality.
  • Time based function Actions/Conditions, similar to Rex's Timeline Plugin, but incorporating the Async Stack Runtime.
  • Staggered For-Each Function: A function that let's you choose the number of instances are iterated per tick, essentially processing instances of the type in batches, staggered over time. Loops forever until broken using Break Loop, so only intended to be called one time until it is no longer needed and incorporates the Async Stack Runtime
  • Wait For Signal: Like Delay, but waits until a signal is called to allow the next iteration of the function loop to occur.

Download

Download NowName your own price

Click download now to get access to the following files:

1.1 11 kB
1.0 9.9 kB