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
http://steamcommunity.com/sharedfiles/filedetails/?id=368970814
heres a simple program that hopefully explains this:
heres the list of blocks and what type of input, and output they can give/recieve:
http://steamcommunity.com/sharedfiles/filedetails/?id=360966557
the whole trick is learning the parts of the line of code.
"var" means to make a variable, "door1" was a name i made up, to define the door (this can be any name)
"GridTerminalSystem" not really sure lol, but u need it
"GetBlockWithName" searchs ur control panel for a block that has the same name. ( the name of the block can be changed in control panel, so make sure everything is names correctly) (also its case sensitive)
and the "as IMy..." part defines that it is of that type. ( refer to the link below to find the correct names for each block type)
"door1.Open" the first part is the name we defined it "door1" this can be anything u want as well, as long as the names match. and the "Open" part is another part of code u cant see (specific to doors), that basicly returns a boolean variable (ie. true or false, 1 or 0) to tell if the door is open.
then my "if" statement says, "if the variable returned from Open is true, then do the code inside the { }'s
lastly, the "GetActionWithName" part looks for different commands the block can do, these are the same commands u can drag to ur toolbar in game, from the G menu. but they are not all spelt the same (refer to the link below to see all the actions a block can use)
our example turns the light on, using the action "OnOff_On" that part is confusing i guess cuz how the names the action. ie: to turn on is "OnOff_On", to turn off is "OnOff_Off", and to just toggle between 1 or the other is "OnOff"
then the "Apply" part just makes it run the action u picked.
goodluck, and have fun!
ps i wrote this in steam, so its sloppy, and my SE crashes when i alt tab. so it might be wrong. but it should work
in other words, if u run this program, THEN open the door, it will NOT turn the light on.
it will only look to see if the door is open, then turn the light on if the doors open, then close.
u need to use a timer block, set the timer to 1 or 2 seconds, set the timer action to "run" the "program block", and then click "start" on the timer.
this will run the program over and over every 1 or 2 seconds, allowing the light to turn on when u open the door