Turning a lamp red or green based on train stop state

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
AellaCarina
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Mar 29, 2019 12:25 am
Contact:

Turning a lamp red or green based on train stop state

Post 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?
mmmPI
Smart Inserter
Smart Inserter
Posts: 4599
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

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

Post 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.
Post Reply

Return to “Gameplay Help”