How to serialize signals?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
adam_bise
Filter Inserter
Filter Inserter
Posts: 358
Joined: Fri Jun 08, 2018 10:42 pm
Contact:

How to serialize signals?

Post by adam_bise »

How do I remove all but one signal?

Like x=1, y=3, c=2 and output only x=1 until x has no signal, then output y=3 and so on in any order.

Is this doable? I know how to do it while specifying all possible signals, but would rather a small approach.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: How to serialize signals?

Post by DaveMcW »

adam_bise wrote:I know how to do it while specifying all possible signals, but would rather a small approach.
Nope, specifying all signals is the only way.

viewtopic.php?t=42902

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: How to serialize signals?

Post by zOldBulldog »

I usually check each condition in its own comparator, with all outputting something like green =1 . Then it is a simple matter of feeding them all into one more comparator that checks green >= n, where n is the number of conditions to satisfy.

User avatar
Lav
Filter Inserter
Filter Inserter
Posts: 384
Joined: Mon Mar 27, 2017 10:12 am
Contact:

Re: How to serialize signals?

Post by Lav »

Hmm, if you put a Decider with conditions "IF Each >= Everything OUTPUT Each", will it eliminate all signals except the strongest? If it works, then you get a bunch of signals with maximum numeric value. After that, you just need to place a bunch of constant combinators to add unique values for each single possible item, which will resolve the signal equality, and then run the resulting signal through another maximum picker, thus receiving a single value.

Then you'll need to keep outputting that value until it disappears, which means a bypass for that entire schema which will keep track of currently selected value and output it for as long as it's non-zero.

thedarkbunny
Inserter
Inserter
Posts: 46
Joined: Mon Oct 23, 2017 10:46 pm
Contact:

Re: How to serialize signals?

Post by thedarkbunny »

I think I tried that once. IIRC, combinators can't use anything/everything/each on the right side of an operation.

Post Reply

Return to “Gameplay Help”