Page 1 of 1

How to serialize signals?

Posted: Sun Jun 24, 2018 6:19 pm
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.

Re: How to serialize signals?

Posted: Sun Jun 24, 2018 6:50 pm
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

Re: How to serialize signals?

Posted: Sun Jun 24, 2018 7:40 pm
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.

Re: How to serialize signals?

Posted: Mon Jun 25, 2018 1:11 pm
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.

Re: How to serialize signals?

Posted: Mon Jun 25, 2018 5:37 pm
by thedarkbunny
I think I tried that once. IIRC, combinators can't use anything/everything/each on the right side of an operation.