Space Engineers

Space Engineers

26 个评价
Auto Close Door Advanced
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
1.874 KB
2016 年 4 月 24 日 上午 4:30
2017 年 4 月 20 日 上午 6:21
5 项改动说明 ( 查看 )

订阅以下载
Auto Close Door Advanced

描述
:: Auto Door Close Advanced ::
This script will auto close each door independently, consistently in time after it was opened (accurate to the second).
If you have 3 doors, and you open each one every 2 seconds.
Then the first door will close exactly 5 seconds later and then the second and third but 2 seconds apart as they were opened.

Doors can be ignored too! Use a common key word in the names of the doors that you do NOT want to auto close. So if you do not want any air tight hangar doors to auto close, try using the key word "hangar" in the ignore feature. Remember to re-compile if you change door names, see note below.

:: Note ::
This script is optimised. That means that it will scan for door blocks on start up, not every time it's run. Thus if you add any new doors, you must recompile the script. (from the programming block, check code, remember and exit)

:: Instructions ::
To use, create a programming block and a timer block
Place this script in the programming block
Open the timer block and set it's actions to
1) this Programming Block, Run
2) this Timer block, Start

The timer blocks interval is the accuracy. Recommend using 1 second
The DOOR_CLOSE_INTERVAL is the time the door will remain open before it is closed.
Door time open = (timerBlock interval * DOOR_CLOSE_INTERVAL) seconds


Now, open some doors and enjoy them closing a consistent amount of time later.


::Author::
Exodus
Please thumbs up if you like =P
19 条留言
Simmo  [作者] 2019 年 3 月 9 日 上午 6:52 
Hi Sanchii.

Open the script from the programming block and look for the text "IGNORE_DOOR_KEY". You can change this value to what ever you like.

By default this is set to "hanger". I have used a value like "manual" in the past. Just remember to add the text "Manual" the names of all the doors to don't want to be auto closed on your grid/ship.

Also remember to recompile the script after changing your door names too.
Kiro 2019 年 3 月 9 日 上午 5:11 
Where do I put the Key command to not close a door?
Simmo  [作者] 2017 年 8 月 8 日 上午 6:52 
You can set the script's value DOOR_CLOSE_INTERVAL = 1 and then set the timer block to what ever you want the delay to be.
. 2017 年 8 月 8 日 上午 6:15 
how do you change the close delay time
John CO. 2017 年 6 月 7 日 下午 3:29 
YAY!!! :p2cube:
hugopnabais 2017 年 5 月 4 日 上午 8:30 
Thank you, it worked fine! Good job!
Simmo  [作者] 2017 年 4 月 24 日 下午 8:55 
@hugopnabais, in your timer block's actions set it up as follows

1) programable block - run
2) timer block - start

In the properties of your timer block, slide the timer down to 1 second

hugopnabais 2017 年 4 月 24 日 下午 5:17 
How do I configure Timer to run every second? It only runs once and ends!
Acid 2017 年 4 月 21 日 下午 1:39 
Timer block set on 'Start' works fine. I guess it really just didn't liked the 'trigger now' option.
Acid 2017 年 4 月 21 日 下午 1:26 
As far as i knew, it fired only once per second. Timer was set on every second to run the programmable block, and 'trigger now' itself. I'll try 'start' instead of 'trigger now', i guess ?