Quick Combinators Question.

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
User avatar
Xterminator
Filter Inserter
Filter Inserter
Posts: 981
Joined: Sun Jun 15, 2014 4:49 pm
Contact:

Quick Combinators Question.

Post by Xterminator »

I have been trying to learn Combinators a bit better and have gotten a pretty good grasp of constant and deciders, but having problems trying to get something to work with arithmetic ones.

So I know it does arithmetic and I understand how to set up tat combinators itself, but I'm not quite sure on how to get an Inserter to work how I want with it. Here is what I want to do:
Have the arithmetic guy set to "Red Science Packs * 2" and output that result as Basic Inserters. As I said, I know how to set the arithmetic guy up for that, and I would obviously need to hook him up to the Science Pack chest on the input.
But what I want to achieve with this is to essentially always have 2x the amount of Inserters compared to packs. So I want the Smart Inserter that pulls the Basic Inserters from the machine to work until there is 2x the amount of Basics compared to Science Packs.
So if there 12 packs in the chest I want there to be 24 Inserters on the Inserter chest, if there are 50 packs I want there to be 100 Inserters etc. So I want it to always be 2x the amount of packs, regardless of the number of packs.

How do I actually tell the Inserter to this? I think I need at least one more Combinators or something but not really sure. Cause obviously the arithmetic guy is always outputting 2x Inserters compared to the amount of packs, but hooking that up to the Smart Inserter does nothing (obviously).
Hope I made it clear enough, let me know if you need more clarification though.
Thanks!
Image Image Image

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Quick Combinators Question.

Post by XKnight »

You need only one arithmetic combinator for this task: "Red Science Packs * -2".
Then you should connect smart inserter to arithmetic combinator's output and science pack storage simultaneously.
Also, do not forget to set "<0" condition in your smart inserter.
Example:
5 science pack
7 inserters

Combinator output: 5 * -2 = -10
Inserter input: -10 + 7 = -3

As a result smart inserter will put 3 more items into the storage.

User avatar
Xterminator
Filter Inserter
Filter Inserter
Posts: 981
Joined: Sun Jun 15, 2014 4:49 pm
Contact:

Re: Quick Combinators Question.

Post by Xterminator »

XKnight wrote:You need only one arithmetic combinator for this task: "Red Science Packs * -2".
Then you should connect smart inserter to arithmetic combinator's output and science pack storage simultaneously.
Also, do not forget to set "<0" condition in your smart inserter.
Example:
5 science pack
7 inserters

Combinator output: 5 * -2 = -10
Inserter input: -10 + 7 = -3

As a result smart inserter will put 3 more items into the storage.
Thanks I'll give that a try. :) This is a really dumb question but how do I set it do " * -2" ? I can't type in the minus sign in the number box.. lol
Image Image Image

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Quick Combinators Question.

Post by XKnight »

At first you should type "2", then move cursor before "2" and type minus :D
Image

Post Reply

Return to “Gameplay Help”