Space Engineers

Space Engineers

Not enough ratings
Delayed Execution / Action Queue
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
359.145 KB
1 Jan, 2015 @ 2:03pm
1 Change Note ( view )

Subscribe to download
Delayed Execution / Action Queue

Description
This scripts shows how to execute code after a certain amout of time.
Important: You have to place a timer block that triggers the programming block every second.

With this model, you only need one timer block for all your delayed executed code (independant of the delay time).
You can queue up your actions/code like:
Delay(5, "LightsOn");
Delay(10, "RotorStart");

If someone have a bettor solution to solve this problem, i would like to hear about.

Some additional words:
I tired to pack the queue entries in seperat class,
but at the moment you can't create lists of your own class.
var list = new List<MySubClass>();