Space Engineers

Space Engineers

View Stats:
Script for showing if a specific machine is on or off
I am using the nanite mod to build ships but it not visible from the build area. is the a script that will display on a text screen the on/off status of block, and possibly change light(s) to show its on?
< >
Showing 1-11 of 11 comments
KristofDeRaver Jan 17, 2020 @ 1:46am 
I would be able to make a script for that I think. For instance a script that checks all blocks in a certain group an d displays if they are or or off on an lcd. If there is also an interior light with the same name, it is put on or off as well.
Candarian Jan 17, 2020 @ 1:53am 
but wouldnt a timer block behind each machine be enough?

start timer block survival kit
survival kit on/off
lamp survival kit on/off

than every time u start the timer block it turn the survival kit and the lamp on or off

no need for a script (ok there might be a bit space for timer blocks needed)
Last edited by Candarian; Jan 17, 2020 @ 1:56am
KristofDeRaver Jan 17, 2020 @ 3:17am 
Timer could indeed work if you always turn of and on using the timer and never. But the lcd part ?
SalazarWindriver Jan 17, 2020 @ 3:48am 
Originally posted by KristofDeRaver:
Timer could indeed work if you always turn of and on using the timer and never. But the lcd part ?
I went the LCD part cause I have been doing a lot of programming block work at the moment. But if you made a script that would be great. You would be able to add more features as well (not that I can think of at the moment). I know the nanite machines mod has a lot of into in the control panel.
Karmaterrorᵁᴷ Jan 17, 2020 @ 4:02am 
If you wanted to know when your ships built a vanilla option may be a sensor. Have it set up covering the bit of the projection that builds last. Set it to detect large grid. Now when that last bock gets welded it trips the senor.... that trips a timer... that lights up a light or does whatever you want to let you know the ships ready :)
Last edited by Karmaterrorᵁᴷ; Jan 17, 2020 @ 4:02am
SalazarWindriver Jan 17, 2020 @ 4:16am 
It could also be used to change the color of the lights. in my case its a welding area so turn red while on and green or white while off.
ShadedMJ Jan 17, 2020 @ 5:22am 
Something like this?
I haven't used it in game, but should activate a light when projection is complete.

IMyProjector Prj=null;
Prj=GridTerminalSystem.GetBlockWithName("Projector") as IMyProjector;
IMyLightingBlock Lig;
Lig=GridTerminalSystem.GetBlockWithName("Spotlight") as IMyLightingBlock;
Lig.Enabled=(Prj.BuildableBlocksCount==0);
Last edited by ShadedMJ; Jan 17, 2020 @ 5:23am
Jawa Jan 17, 2020 @ 6:39am 
The LCD part is quite easy actually. I just set that up in one of my own projects. MMaster's Automatic LCDs 2 script can do it.
https://steamcommunity.com/sharedfiles/filedetails/?id=822950976&searchtext=automatic+LCDs

To configure this script you edit the custom data of the LCD you are working with. So you would put something like:
PropBool {Nanite Block} {OnOff} {Nanite Builer} {On} {Off}
Displays: "Nanite Builder On" if the block named "Nanite Block" is on.

There is a complete guide to using the script if you want to do more with it.
SalazarWindriver Jan 17, 2020 @ 1:02pm 
Originally posted by Jawa:
The LCD part is quite easy actually. I just set that up in one of my own projects. MMaster's Automatic LCDs 2 script can do it.
https://steamcommunity.com/sharedfiles/filedetails/?id=822950976&searchtext=automatic+LCDs

To configure this script you edit the custom data of the LCD you are working with. So you would put something like:
PropBool {Nanite Block} {OnOff} {Nanite Builer} {On} {Off}
Displays: "Nanite Builder On" if the block named "Nanite Block" is on.

There is a complete guide to using the script if you want to do more with it.
Yeah I looked at that and i coudn't wrap my head around the config for some reason would it be that simple?
Jawa Jan 17, 2020 @ 1:10pm 
Yep, it can do a lot so it looks like it is going to be complicated, but it is not really. The LCD needs the tag [LCD] and for my example the block you are checking needs to be named "Nanite Block", but you cane make this what ever you want.
SalazarWindriver Jan 18, 2020 @ 10:52am 
Originally posted by Jawa:
Yep, it can do a lot so it looks like it is going to be complicated, but it is not really. The LCD needs the tag [LCD] and for my example the block you are checking needs to be named "Nanite Block", but you cane make this what ever you want.
it also looks like just using the working command works as well. Going to check as well but does anyone know if there is something that will show that nanite status on a lcd screen?
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: Jan 16, 2020 @ 9:00pm
Posts: 11