Space Engineers

Space Engineers

121 ratings
Red Alert! Script
5
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
48.100 KB
14 Aug, 2017 @ 5:36am
21 Jan, 2020 @ 12:59pm
22 Change Notes ( view )

Subscribe to download
Red Alert! Script

Description
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)
Popular Discussions View All (4)
21
1 Jun, 2024 @ 3:53pm
PINNED: Bug reports & Requests
Palatinus
4
1 Jul, 2023 @ 8:35pm
CHANGE ALERT SOUND
Knasen
3
17 May, 2019 @ 7:36am
PINNED: ToDo & Developer notes
Palatinus
133 Comments
Jayfeather 19 Aug, 2024 @ 9:16am 
Hi all! I fix problems with corner LCDs and add new vanila LCD support
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3312352397
==Lucanmoonshadow== 1 Jan, 2024 @ 12:04am 
Doesn't work with Energy Shields... I've tried everything to make it work.
Siam 9 Dec, 2023 @ 12:16pm 
@Idacat411
It seems the author isnot communicating anymore, are you going to rework the script anyway?
Drifter_TOA 13 Oct, 2023 @ 3:37pm 
@Palantinus The Mod is no Longer working with the Defence Shields mod Can you please get this fixed?
Idacat411 29 Aug, 2023 @ 8:58pm 
@Palatinus May I have permission to Re-Work this Script to update it?
Palmer 23 Jul, 2023 @ 2:24pm 
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 28 Jun, 2023 @ 5:01pm 
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 2 Jun, 2023 @ 5:39am 
Someone know how to make the script work in Transparent LCD or modding LCD?

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