Space Engineers

Space Engineers

29 értékelés
Hull Breach Alert (Sound + Script)
   
Díjazás
Kedvenc
Kedvenc
Törlés
Type: Mod
Mod category: Script, Other
Fájlméret:
Közzétéve:
Frissítve:
404.772 KB
2015. júl. 28., 5:36
2015. aug. 8., 12:11
2 változásjegyzék ( megnézés )

Feliratkozás a letöltéshez
Hull Breach Alert (Sound + Script)

Leírás
What it does:

- Adds a sound to the soundblock (female robotic voice)
- If used with the following script, it detects and warns you of hull breaches
- The voice says Warning, possible hull breach detected.
("Possible", because it might just be an open door. :D)
- Added 2nd sound: Warning, hull breach detected.

Use in combination with this script:
Link below is for the lazy guys, who want to use the ingame workshop to paste in the script and for those who don't like the sound, I provided or play the game vanilla.
http://steamproxy.net/sharedfiles/filedetails/?id=489701020


void Main() {

var airVents = SearchBlocksByName("Air Vent");
var pressureStatus = "Pressurized";

string soundBlockName = "Sound Block Hull Breach";

List<IMyTerminalBlock> mySoundBlock = new List<IMyTerminalBlock>();

GridTerminalSystem.SearchBlocksOfName(soundBlockName, mySoundBlock);

for (int i = 0; i < airVents.Count; i++) {
string pressureInfo = airVents.DetailedInfo;
if(pressureInfo.IndexOf("Not pressurized") != -1) {
if(pressureStatus == "Pressurized")
pressureStatus = "Depressurized";
}
}

for(int j = 0; j < mySoundBlock.Count; j++){
if(pressureStatus == "Depressurized") {
mySoundBlock[j].GetActionWithName("PlaySound").Apply(mySoundBlock[j]);
}
}
}

List<IMyTerminalBlock> SearchBlocksByName(string blockName) {
var blocks = new List<IMyTerminalBlock>();
GridTerminalSystem.SearchBlocksOfName(blockName, blocks);
return blocks;
}


How to use:

- Setup a ship or station with one or multiple air-sealed rooms.
- Place a timer block, a programmable block and a soundblock
- Make sure you placed air vents
- Every air vent must have the words "air vent" in it's name without quotes
- Name the soundblock: "Sound Block Hull Breach" without quotes and select the Hull Breach sound
- Set the timer block to 8 seconds and make it "run" the programmable block, aswell as repeat itself
- I chose 8 seconds, because the sound is 3 seconds long and i wanted to have 5 seconds between warnings, obviously you can change the value however you like, but if you go to 3 seconds or less you'll have a constant warning

For use in rooms with doors leading outside:

- Place a button and a timer block
- Set the button to make the timer block Trigger Now
- Set the timer block actions to open/close the door AND turn on/off the soundblock
- Be aware, this method simply turns off the soundblock while the door is open, so you won't be warned if there actually is a hull breach while the door is open

Did it work?:

- Pressurize the rooms
- Delete a block, so a room gets depressurized
- Within 8 seconds the soundblock should warn you
9 megjegyzés
EnGinEAR 2021. ápr. 10., 21:10 
@maniac you could use visual script builder to do that, just google it
Twiz 2020. júl. 5., 8:46 
yeah this doesn't work
J_1111 2020. márc. 30., 5:52 
This was one of the mods that caused an error in my loading a saved game. When I removed it (with the other ones) from my mod list, I was able to then load the saved game successfully. Just an FYI to the author.
Slimbo  [készítő] 2018. jan. 9., 10:11 
hahahahaha good one :KSmiley:
Hull Breach 2018. jan. 8., 17:35 
For some reason I like the name of this mod.
MasterNuts 2017. ápr. 22., 22:19 
Could the process work by clustering all sound blocks, and naming the group as "Sound Block Hull Breach"?
JamesWat127 2016. okt. 9., 20:33 
good piont
Maniac 2016. febr. 16., 21:20 
"but if you depressurize a room using an air vent the alarm doesn't go off. "

Yes, the alarm does go off, if there's a door open. What this script could do, and I hope to someday understand enough about scripts modify it, is check to see if the vent is set to depressurize, before activating the alarm. This could be useful in two ways.

One: A room, like a hangar, that's depressurized, before (or even after) opening, would not set off the alarm, as it is intentional

Two: The alarm could be silenced, by setting all air vents to depressurize.
Slimbo  [készítő] 2015. aug. 9., 8:37 
Not sure if that helps you but if you depressurize a room using an air vent the alarm doesn't go off. Only if you open the door and don't use a timer block to deactivate the sound block, but the alarm won't go off if you open the door, go through and close it back up. But yeah if you could actually check a room for it's hull integrity by checking the armor blocks, that would be awesome. :D: