Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Program(50,67): Error: 'IMyBlockGroup' does not contain a definition for 'Blocks' and no extension method 'Blocks' accepting a first argument of type 'IMyBlockGroup' could be found(are you missing a using directive or an assembly reference?)
Please help because your idea is great!
to "GridTerminalSystem.GetBlockGroups(blockGroups);"
This script is obsolete.
So he is right when he says "No mods needed " :)
only thing, if you use it in the construction phase, you have to start the program new after adding some parts
@[K.I.] Freedom's Flame
I've got Interior lights setup as Light Alarm <ZONE>
and tried to expand your awesome code a little : 3
didn't go that well haha.
I tried to setup to search (just like the "Air Vent") for blocks with Light Alarm in it,
then when a zone gets depressurized, the lights go on (and each light is setup to be flickering etc. ) So just OnOff_On & OnOff_Off had to be changed for each block containing Light Alarm
to turn on when depressurized, and off when pressurized.
anyone got a piece of code for me ^^
I would really appreciate it :)
- Mark
(
thanks for your help!
nicely done!
thanks for sharing :)
(it was the modded Air Vents which caused the problems ;))
- Mark
>is a mod
Nice work too with the sound block alarm script haha LCDs look great
that might actually be it :/
I'm so sorry, and glad that you might have found the cause of the problem!
I'm going to give it a try tomorrow!
I'll let you know!
Anyway!
thanks for your help, time and awesome concept!
- Mark
The door shouldn't be tricking the game. You could test your theory by adding a vent into the gap between the doors. I doubt it will fix your problem (because I don't think that is the problem). I think you have an air leak somewhere.
I hope I won't bother you too much.
the LCD's were already working at that time, maybe I wasn't that clear,
the LCD's do update when I change the name of a air vent (It shows the data on screen with how "All X zones are pressurized." and the "Life Support:" strings.)
only it doesn't respond to unpressurized rooms.
so it shows the amount of zones / pressurizers, but not when one gets depressurized / pressurized...
Thanks for your time, and sharing this cool concept of LCD with oxygen alarm ;)
But here is a reference model of what I have:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=275097654
I built this but I am working on an FPS-Friendly version right now with an Oxygen system
(This is an old outdated ship without the proper insulation needed for an oxygen system)
I have noticed that since Thursdays update sometimes the screens glitch out. This will probably be fixed next week. If that happens just recompile the script in the editor and it seems to fix it.
but stil haven't figured out why the screens aren't showing, and the alarm doesn't ring when a zone with a configurd airvent doesn't work
What I noticed though, is that the timer isn't being started automatically, which may point to the code not being fully executed. tried to figure it out myself, but couldn't find the problem. the programmable block doesn't give an error whilst manually updating it.
further I can say that when I add a airvent conveyor block, and name it Air Vent <ZONE NAME etc.> nothing happens on the LCD's, but when I manually execute the code (Through the programmable block and / or timer) it update's. Which may point that the code is incorrect / incomplete after the Air Vent increment count and before the restart timer piece.
I hope someone could figure this one for me ^^
and find a fix, where I couldn't.
thx for trying / helping me!
(Stil not sure if it is the code which is wrong or I)
(And Kesuke, thx for the code anyway :) )
- [Dangny] Mark
Works very well and I took the liberty to 'expand' your script to change an intererior light color to reflect the status of a room:
//Definition:
List<IMyTerminalBlock> airLight = SearchBlocksByName("Air Light");
//Add to vent-check loop
VentLocation = airVents[i].CustomName.Substring(8);
// Change light color to status:
// If( (IsDepressurizing) || etc etc )
LightColor = Color.Red;
// Else if (!IsDepressurizing)
LightColor = Color.Green;
// At the end of for-loop
SetColorOfLight(airLight, VentLocation, LightColor);
void SetColorOfLight(List<IMyTerminalBlock> blocks, string Location, Color color)
{ for (int i = 0; i < blocks.Count; i++)
{ IMyInteriorLight light = blocks[i] as IMyInteriorLight;
if( !(blocks[i].CustomName.IndexOf(Location) == -1)){
light.SetValue("Color", color);
}
}
}
Probably the search of the right interior light could have been nicer, but right now I only knew the 'for' loop as a solution ;-)
if(pressureStatus == "Depressurized") {
alarm.GetActionWithName("PlaySound").Apply(alarm);
} else {
LCDText += " All " + airVents.Count + " zones are currently pressurised";
}
And change it to this;
if(pressureStatus == "Depressurized") {
alarm.GetActionWithName("PlaySound").Apply(alarm);
// Close all doors when pressure is lost
List<IMyTerminalBlock> allDoors = new List<IMyTerminalBlock>();
GridTerminalSystem.GetBlocksOfType<IMyDoor>(allDoors);
for (int i = 0; i < allDoors.Count; i++) {
allDoors .GetActionWithName("Open_Off").Apply(allDoors );
}
} else {
LCDText += " All " + airVents.Count + " zones are currently pressurised";
}
And that will close all doors on the ship when pressure is lost :)
bill4725 - You can have as many (or few) vents and LCD's. You don't need to make the number of vents and LCDs match. The problem you had was probably that the ownership of the LCDs wasn't set to you and the public text wasn't set to "Everybody" and "read only". I'm glad you got it fixed. Let me know if you still have trouble and maybe upload it to the workshop.
kyrkbarron - If you want to exclude an air vent from this system simply give it a name that doesn't begin with "Air Vent".