Space Engineers

Space Engineers

121 个评价
Red Alert! Script
5
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
48.100 KB
2017 年 8 月 14 日 上午 5:36
2020 年 1 月 21 日 下午 12:59
22 项改动说明 ( 查看 )

订阅以下载
Red Alert! Script

描述
Red Alert! Script v2.1 by MrHam5

This script will give you the original Start Trek feels! It controls some of your ship's system like lights, LCDs, souundblocks, door, weapons, - and if you choose to - shields as well.
You can activate alerts that have different properties.
For example: activating Red alert will activate your weapons and raise your shields, while hitting Normal mode will clear all combat-preparations.

* the use of shield is optional
* if you want to use the script with shields you will need Cython's Energy Shields or the Defense Shield modpack

News:

Update 2.1 is has arrived!
- Complete visual overhaul, making every display in the game nice and animated. depending on the size of the display, different animations are displayed.
- Huge performance update: the script should now run much more efficiently, while keeping memory usage at minimum.
- Added the support for Transporter Jammers. they will come online with the shields.

Update 2.0 is here!
- Script now uses the new display system, which means that you can display it your Cockpits and other blocks as well. More information down below, at the SETUP
- Huge code improvements, rewritten most of the existing code to make it more understandable and faster
- Major bug fixes

1.7.5 Auto-System-Toggle function!
- Normal, Yellow, and Red alert now controls your shield and weapon systems. This means that when you enter Yellow alert, your shield will be turned on. When you enter Red alert your weapons turn on as well.
- Normal mode cancels these battle-preparations.

1.7.5 Interior light dimming!
- If you set it up, alerts like Grey alert will dim the lights on your ship for additional visual effects.

Known issues:

Script not detecting the Defense Shield mod after loading up a world. (issue is with the mod, will contact the dev)
fix: Open the shield controller and manually Raise & lover the shield. Then go to the script and hit reset or Recompile.

Some displays are not working properly, e.g. Corner LCDs, and the Console block. (SE issue, will create a ticket and hope they will fix it)
fix: None at the time. Will make attempts to get around it.

Modded LCDs and Surface providers are not supported just right now, with the next hotfix i will add support.

SETUP:
Does NOT need a timer block

Just simply put Alert in the name of the block you want to control. Block types that the script can control: lights, sound blocks, doors, LCDs, and any block that has a display like the Cockpits.

How to display the script in your Cockpit?
Add Alert to the cockpit's name, then hit refresh on the Programmable block running the script. After that, open the Cockpit's CustomData. Set the false value true at the display you want it to be shown.

USE:
To command the script you need to give it arguments
In a Cockpit or on a Button Panel add a new action for the Programmable block
Select RUN and type in one of the following arguments:
* normal --> clears the alert
* red --> sets alert mode to Red
* yellow --> sets alert mode to Yellow
* green --> sets alert mode to Green
* blue --> sets alert mode to Blue
* black --> sets alert mode to Black
* grey --> sets alert mode to Silent running (or Grey alert)
* intruder --> sets alert mode to Intruder
* engineering --> sets alert mode to Engineering

* toggle --> manually opens or closes the blast doors
* reset --> resets the script
You need to reset the script every time after you modify your ship!

CUSTOMISATION:
You add your own alert types like this:
AlertHandler.AddCustomAlert("myalert", "My own alert", new Color(255, 255, 255), Blink.AlwaysOn, false, Doors.NoInteract, "", Systems.AllOffline);

* the argument you type in the Programmable Block
* the title displayed on screens
* color of the light (r,g,b)
* blink mode (AlwaysOn / Slow / Fast)
* should the interior lights get dim (true / false)
* door toggler mode (NoInteract / Close / Open)
* name of the sound to play, leave empty if no sound should be played
* should the weapons/shields get enabled (AllOffline / ShieldsOffline / AllOnline)
热门讨论 查看全部(4)
21
2024 年 6 月 1 日 下午 3:53
置顶: Bug reports & Requests
Palatinus
4
2023 年 7 月 1 日 下午 8:35
CHANGE ALERT SOUND
Knasen
3
2019 年 5 月 17 日 上午 7:36
置顶: ToDo & Developer notes
Palatinus
133 条留言
Jayfeather 2024 年 8 月 19 日 上午 9:16 
Hi all! I fix problems with corner LCDs and add new vanila LCD support
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3312352397
==Lucanmoonshadow== 2024 年 1 月 1 日 上午 12:04 
Doesn't work with Energy Shields... I've tried everything to make it work.
Siam 2023 年 12 月 9 日 下午 12:16 
@Idacat411
It seems the author isnot communicating anymore, are you going to rework the script anyway?
Drifter_TOA 2023 年 10 月 13 日 下午 3:37 
@Palantinus The Mod is no Longer working with the Defence Shields mod Can you please get this fixed?
Idacat411 2023 年 8 月 29 日 下午 8:58 
@Palatinus May I have permission to Re-Work this Script to update it?
Palmer 2023 年 7 月 23 日 下午 2:24 
I don't know if an update to defense shields broke this script or not but whenever there is a shield controller on my grid I get this error, even if the config is set to false for the automatic shields.

Launching script...
Caught exception during execution of script:Object reference not set to an instance of an object.
at Program.DefenseShields..ctor(IMyTerminalBlock block)
at Program.CalculateShield(Boolean reset)
at Program..ctor()

can anyone help?
xXDevoriousXx 2023 年 6 月 28 日 下午 5:01 
Does this script not work with modded lights and guns? in my current save the script didn't even detect them, though could be doing something wrong somehow~
Kinoe 2023 年 6 月 2 日 上午 5:39 
Someone know how to make the script work in Transparent LCD or modding LCD?

Thanks
Parker Posey's Mouth 2022 年 10 月 17 日 上午 3:24 
Is this broken? I can't get the alert tag to apply to anything but the PB I put the script on.
BeeSkee 2022 年 10 月 9 日 下午 8:32 
I'm getting a "script is too complex" error now, which is a shame since I love this alert script.