Space Engineers

Space Engineers

29 평점
Hull Breach Alert (Sound + Script)
   
어워드
즐겨찾기
즐겨찾기됨
즐겨찾기 해제
Type: Mod
Mod category: Script, Other
파일 크기
게시일
업데이트일
404.772 KB
2015년 7월 28일 오전 5시 36분
2015년 8월 8일 오후 12시 11분
변경 사항 2개 ( 보기 )

다운로드 위해 구독하기
Hull Breach Alert (Sound + Script)

설명
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
EnGinEAR 2021년 4월 10일 오후 9시 10분 
@maniac you could use visual script builder to do that, just google it
Twiz 2020년 7월 5일 오전 8시 46분 
yeah this doesn't work
J_1111 2020년 3월 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  [작성자] 2018년 1월 9일 오전 10시 11분 
hahahahaha good one :KSmiley:
Hull Breach 2018년 1월 8일 오후 5시 35분 
For some reason I like the name of this mod.
MasterNuts 2017년 4월 22일 오후 10시 19분 
Could the process work by clustering all sound blocks, and naming the group as "Sound Block Hull Breach"?
JamesWat127 2016년 10월 9일 오후 8시 33분 
good piont
Maniac 2016년 2월 16일 오후 9시 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  [작성자] 2015년 8월 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: