Page 1 of 1

Turning a lamp red or green based on train stop state

Posted: Mon Sep 26, 2022 3:08 pm
by AellaCarina
I'd like to do the following, but I'm not very smart with this kind of thing and would appreciate some help:

If a train stop is enabled, I'd like to have a lamp turn green. If a train stop is disabled, I'd like to have a lamp turn red.

How can I make this happen?

Re: Turning a lamp red or green based on train stop state

Posted: Mon Sep 26, 2022 3:35 pm
by mmmPI
This can be done using 2 decider combinators and a lamp.

1 of those decider combinator should be connected to the train stop with a wire so that their input is the same as the train stop. ( use both green and red wire if necessary).

That same decider combinator should have the same condition as the condition that enable the train stop. ( if iron < 1000 for example ).

The ouput of this decider combinator should be "green signal" "input 1". I call "green signal" the green colored signal appearing under the letters.

This output should be connected to the lamp using any green or red wire.

This output should also be connected to the 2nd decider combinator's input, using green or red wire.

This second decider combinator should have as a condition : "green signal = 0" and as output "red signal" "input 1".

This second decider combinator should be connected to the lamp.

The lamp should have the 2 boxes selected, to be set up to "activate if anything > 0" and to "use color".




This is an example for "iron<1000" , with 2 constant combinator on the left side used to mimic chest containing iron.