Space Engineers

Space Engineers

评价数不足
Nightlight - Automatic light switching during day/night
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
3.277 KB
2016 年 8 月 28 日 上午 10:02
2019 年 6 月 16 日 上午 6:09
6 项改动说明 ( 查看 )

订阅以下载
Nightlight - Automatic light switching during day/night

描述
This script turns all your Interior & Spotlights on in the night, and off during daytime. - Completly automatic without mods

Functions:
  • Automatic lights at night
  • Configurable trigger(light strength)
  • Overwrite function for battle
  • Interior and Spotlights
  • Custom prefix
  • Switchable prefix

What you need:
  • Lights ^^
  • Programmable block
  • Solarpanel

Setup:
[In the script]
43 条留言
BooseOG 2024 年 11 月 1 日 上午 7:14 
just use a event controller
erik 2024 年 2 月 16 日 下午 12:36 
good evening no longer works an update maybe
Demonik 2023 年 11 月 15 日 上午 1:33 
@ Commander Rotal I have the same error now too. Did you end up fixing it?
Capt Fuzzy 2023 年 1 月 19 日 下午 5:33 
I don't think this is working...
Either I'm just not understanding how this works or the setup instructions are lacking in a proper explanation of what to do and how to do it.
It doesn't seem to be working though, at least not as far as I can tell, anyway.
I'm getting no compiling errors, or errors that I can see, period.

Some of my questions:
What exactly is 'light strength'? Is it a factor of energy output in some way?
Where does the prefix go? On every light that you want controlled?
Will this work with groups of lights?
When setting up the triggers in the timer block, does it matter what order they are in, i.e., timer block first then PB, or vice-versa?
Commander Rotal 2020 年 2 月 3 日 上午 11:27 
I don't think i've messed with that; last thing i tried was just placing down a completely new setup (new Solar Panel, new Programmable Block etc); first i just checked if it worked without the NL prefix; same error message. Then i tried with the NL prefix as usual; same result.
ThatsEli  [作者] 2020 年 2 月 3 日 上午 11:21 
Mmm, I just checked the script on my end and it seems to work fine for me. Due to the stack trace, the error seems to occur while computing the current solar output. Did you check if the measureSolarPanelName config value is set correctly?
Commander Rotal 2020 年 2 月 2 日 上午 9:53 
Question, old chap; a while ago the script randomly stopped working both when i try to set it up anew and when i just paste in older buildings i KNOW for a fact should work as they are. Any chance you could take a look at this error message?

Caught exception during execution of script:Object reference not set to an instance of an object.
at Program.getSolarPower()
at Program.Main(String argument)
at Sandbox.Game.Entities.Blocks.MyProgrammableBlock.<>c__DisplayClass46_0.<ExecuteCode>b__0(IMyGridProgram program)
at Sandbox.Game.Entities.Blocks.MyProgrammableBlock.RunSandboxedProgramAction(Action'1action, String&Response)
roughnecks 2019 年 11 月 19 日 上午 9:51 
OK, got it working so far, will have to wait for the night and check if it's still going.
Thanks for the script :)
roughnecks 2019 年 11 月 19 日 上午 9:36 
Oh, there's a timer block, apparently. Will give it a go soon.
roughnecks 2019 年 11 月 19 日 上午 9:24 
Hello, I loaded the script, left all the settings alone, since they looked fine to me and run the script but my lights still stay on during the day.

Also, how do I setup a timer? I'm really new to SE. Thanks