Space Engineers

Space Engineers

评价数不足
JP - MBS - Day Night Light Control Script
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
3.947 KB
2019 年 8 月 29 日 下午 12:22
2019 年 8 月 29 日 下午 1:17
2 项改动说明 ( 查看 )

订阅以下载
JP - MBS - Day Night Light Control Script

描述
Reminder: Enable In-Game Scripts in the Advanced Settings to your game to make sure scripts run on your Space Engineer games.

A script that will sense with a solar panel when the sun is out and when it is dark. Nothing for the player to do!

Base lights will turn on automatically at night and turn off automatically during the day so long as this script is running in a programmable block.

This is from my Modular Base System (MBS) Series of blueprints. You can customize it for your own base designs if you wish. Just read the comments from the top of the script that are typed below to learn the pre-requisites and what to rename in the script to match your own base.

/* v:1.0 [ first release ]
*
* JP - MBS - Day Night Light Control - In-game script by Junior Patrick
*
* Last Update: v:1.0 [ first release ]
*
* Previous updates: None. */

/* Customize these:
Solar Panel Control System (SPCS) - Generates electricity when the sunlight hits the panel.
Base Normal Lights (BNL) - All lights on the JP - MBS - PLATFORM that should turn on at night and off at day.

SPCS is any number of Solar Panels which you have named SPCS
BNL is a group name with any number of interior lights assigned to the group

If you have different group names you can use those but be aware for now in version 1.0 I am only using the interior lights as the type of lights I am controlling with this script.

If you are using this as part of the JP - MBS - PLATFORM what you need is:

1. Place a solar panel anywhere on your base that you can get good sunlight, prefer with no shade or shadows during the day. If you have crazy or new pilots maybe place it far away from the landing pads!
2. Name the solar panel SPCS
3. Place a program block on your base
4. In the EDIT CODE window click Browse Scripts
5. Select this JP - MBS - Day Night Light Control script and click Copy to Editor
6. Check Code if you wish, should be no errors
7. Click OK and then in the main program block control panel click Run.
8. Change in game time to cycle day and night and see if the lights are now automated.

9. Enjoy!

*/

Pictures include one idea of how you could combine JP - MBS blueprints to build your own custom base.

See also:

JP - MBS - PLATFORM - STAGE 0:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1847993261

JP - MBS - PLATFORM - STAGE 1:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1847994738

JP - MBS - PLATFORM - STAGE 2:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1847996159

JP - MBS - PLATFORM - STAGE 3:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1847996777

JP - MBS - Landing Pad:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1847997584

JP - MBS - Day Night Light Control Script:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1848708116

JP - MBS - Power Tower:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1848774663

JP - MBS - The Rocket Man 10-4 DLC:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1848846025

JP - MBS - The Rocket Man 10-4 DLC Head Unit:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1848856325

JP - MBS - The Rocket Man 10-4 Non-DLC:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1856992209

JP - MBS - The Rocket Man 10-4 Non-DLC Head Unit:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1856985687