sleep mode for programmable block(PB)
Submitted
it should be nice if a PB can be put in sleep mode .until it gets a new argument.
i like to do this whitout a timerblock.
like this: if PB.CustomName don't contains "sleep" it stops the auto update
Program(){ if (!Me.CustomName.Contains("sleep")){ Runtime.UpdateFrequency=UpdateFrequency.Update1; } }the example will not work, it can't read the CustomName somehow.
Why ?
You've already solved it with quite simple code ;-)
Why ?
You've already solved it with quite simple code ;-)
yes i that so , this code will not work. I think this Program() will not support it , it is not a void or method or is it?
and why. multiplayer. you dont want to run if it is not needed anymore. til the script get a new argument.
yes i that so , this code will not work. I think this Program() will not support it , it is not a void or method or is it?
and why. multiplayer. you dont want to run if it is not needed anymore. til the script get a new argument.
Sorry, I wrote it with argument in mind ... what you aimed to do cannot be done in constructor, you must do it in Main() method ...
here is correct code:
Sorry, I wrote it with argument in mind ... what you aimed to do cannot be done in constructor, you must do it in Main() method ...
here is correct code:
Basically updateSource Terminal is from "run" button in terminal, Trigger is by button, timer, air vent etc, script is from other script.
Mod is probably from another mod - I never encountered it.
Program() constructor is ran only seldom - when the program block is recompiled or loaded from save game ...
You should do only basic initialization there.
You have to do your update switching logic in Main() method.
Basically updateSource Terminal is from "run" button in terminal, Trigger is by button, timer, air vent etc, script is from other script.
Mod is probably from another mod - I never encountered it.
Program() constructor is ran only seldom - when the program block is recompiled or loaded from save game ...
You should do only basic initialization there.
You have to do your update switching logic in Main() method.
i ended up doing it this way. thank for your help Domingo.
}}Is there a reason why you need to do this? It works fine without it.i ended up doing it this way. thank for your help Domingo.
}}Is there a reason why you need to do this? It works fine without it.Replies have been locked on this page!