Space Engineers

Space Engineers

Not enough ratings
Random Timer
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
7.928 KB
14 Jul, 2020 @ 4:22am
1 Change Note ( view )

Subscribe to download
Random Timer

Description
This script performs actions based on a random interval time. Can be set to loop or run once only. The blocks affected can be set. Can also run timer blocks and call other program blocks.

Version: 1

Guide:
Input Commands: (These commands can be entered in the input field of the program block)
"all blocks" - outputs all functional blocks from the grid into the Custom Data field of the program block except itself.
"stop" - the program stops running

To run the program simply hit run. There must be at least one block specified in the Custom Data field for this to work.

Settings:
runMode - How the program should start. 1 for turning everything on and 0 for off
toggle - Whether the program should toggle between on and off. true/false
loop - How many times it should loop. -1 means infinite.
minTime - The minimum interval time in seconds
maxTime - The maximum interval time in seconds

Specifying Blocks:
1. Open the Custom Data field of the Program Block in which the script is run.
2. Enter the exact names of any blocks you want the program to handle. One per line.
3. Hit run to have the program begin.

Tips:
- Make sure you leave at least 1 reactor/power source on. The program will shutdown any reactors listed in the Custom Data if told to do so. The program block itself needs a source of power to run.
5 Comments
RougeSable 8 Feb @ 8:08am 
How would you set the command line & custom data to perform doors opening/closing randomly? I'm very interested in this full example please :)
Captain Durall 6 Sep, 2023 @ 5:44pm 
im trying to use this to make a randomized drone printer. As soon as i figure out the script
Bullet Force  [author] 10 Sep, 2021 @ 2:31am 
It's mostly good for either mischief or for special effects if making a movie.
Johannes 9 Sep, 2021 @ 8:08pm 
Huh, interesting. At least aesthetically. Any ideas for practical use?
SourceStick 14 Jul, 2020 @ 5:47am 
Thank you! Gonna put this to use when I start SE again.