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.
How to serialize signals?
Re: How to serialize signals?
Nope, specifying all signals is the only way.adam_bise wrote:I know how to do it while specifying all possible signals, but would rather a small approach.
viewtopic.php?t=42902
-
- Smart Inserter
- Posts: 1161
- Joined: Sat Mar 17, 2018 1:20 pm
- Contact:
Re: How to serialize signals?
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.
Re: How to serialize signals?
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.
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.
-
- Inserter
- Posts: 46
- Joined: Mon Oct 23, 2017 10:46 pm
- Contact:
Re: How to serialize signals?
I think I tried that once. IIRC, combinators can't use anything/everything/each on the right side of an operation.