Why this circuit doesn't work?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
untech
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Nov 02, 2024 4:05 pm
Contact:

Why this circuit doesn't work?

Post by untech »

I want to create a circuit that outputs all Red signals that are equal to the Green signal.

Here's my attempt, using Each signal in a Decider combinator. Why doesn't it work? I tried several variations on this, and wasn't able to create this.

My overall goal is to filter out all signals which are less than the maximum, calculated via a Selector.
Attachments
Screenshot 2024-11-02 at 20.06.59.png
Screenshot 2024-11-02 at 20.06.59.png (97.26 KiB) Viewed 106 times
Screenshot 2024-11-02 at 20.06.41.png
Screenshot 2024-11-02 at 20.06.41.png (439.91 KiB) Viewed 106 times

Tertius
Filter Inserter
Filter Inserter
Posts: 903
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Why this circuit doesn't work?

Post by Tertius »

What you do is compare in the screenshot is if every signal on the red wire is equal to the same signal on the green wire. Since actually there are all different signals on both wires, this condition isn't true for any signal, so your output is empty. It does this for EACH signal. I guess you want to ignore signals and compare values, so you want to get the B=4 and C=4 as output, isn't it?

With a condition EACH[red] = <check>[green] and output EACH input count[red] you could achieve this. Each signal on red is compared to <check> on green, and for each being equal, it's output if it comes from red.

untech
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Nov 02, 2024 4:05 pm
Contact:

Re: Why this circuit doesn't work?

Post by untech »

Oh, thanks, I got it. I thought that Each on two sides would do a cartesian product :) My problem was that in the actual implementation, the "Checkmark" signal would be computed dynamically. I side-stepped this problem by converting the dynamic signal to a static "Checkmark" via an additional arithmetic combinator, which multiplies Each by 1 and outputs a "Checkmark".

Post Reply

Return to “Gameplay Help”