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
Thanks for the answer, ill just keep the 2 memory then. Cya again on the stream, i hope ;)
alias bWriter1 d0
alias bWriter2 d1
s db Setting 1
yield
s bWriter1 On 1
Does the job for my goal. As stated, use yields to make sure the writers and IC have time to sync.
My GH code includes 2 BW for heating and cooling, filtration, a sensor, and a light for errors or high/low temps. Set screws on IC to include BWs and screws on BW to read the IC
I use code similar to:
j reset
reset:
s db Setting 0
yield
s bWriter1 On 0
s bWriter2 On 0
j check
While I may only turn on one of the BW, I can simplify my code by adding them both into the reset before returning the program to check then go to an idle status
The IC10 has a function called "sb" which if you have the PrefabHash of an object say Speakers (found via F1 in game not the unofficial wiki) the IC can move a register value to the variable of all devices using that PrefabHash meaning that function is a BatchWriter in code.
The great thing about it is if you have a loop using the "sb" function regardless of how many times it is triggered the sound of a Speaker for example does not get interrupted (I have only tried alarms) by placing the same value on a variable unlike some BatchWriter setups (not sure if that is a bug).
In practice it could look like this.
alias Station d0
alias TestBuffer r1
alias Exec r2
Main:
l TestBuffer Station Mode #reading Mode variable of Weather Station into Buffer
sgtz Exec TestBuffer #if Buffer value > 0 value of 1 moves to Exec, otherwise 0
sb -828056979 On Exec #writes Exec onto On variable of all Speakers in Network
sleep 3
j Main
Separating networks is important when using the sb function as it can not target custom groups (to my knowledge) due to using the PrefabHash value.