Counting

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Gustavbrain
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Jun 29, 2016 7:42 pm
Contact:

Counting

Post by Gustavbrain »

Would a way to make a counting mechanism within the circuit network possible? Rather, if I have x item that I want to have a maximum of y, but the item is constantly being produced and used to make products, could you make a way to count how many goes through a certain area, like a smart chest, and output the number passed through as a signal to other chests/inserters so that when the output is greater than y it stops working. Something to count that could, combined with the decider combinator, set maximum limits of things without them being permanently stored in one area. Could have other functions than the one I mentioned, such as allowing you to know how much has passed through certain area in z time so you can predict increases/decreases of supply/use, knowing how much ammo is being used, rate of pollution increase, etc.

TL; DR: In short, something to add 1 every time x happens.
Or something count to specific rates of changes of x event.

Two different things/suggestions, but both fall under counting.

Thank you for your time.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Counting

Post by ssilk »

Sorry, but this is no suggestion. I move it to Gameplay Help, cause that is a simple question. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Lupoviridae
Fast Inserter
Fast Inserter
Posts: 155
Joined: Mon Apr 20, 2015 6:26 pm
Contact:

Re: Counting

Post by Lupoviridae »

You can do this with 2 combinators. Take iron plates as an example.
For a counter, create a decider and connect the output to the input.
1) Set it to output (input count of iron plates) when a random signal = 0 (in other words, always).
2) Create an arithmetic combinator that multiplies iron plates * -1. Connect the output to the counter's input.
3) Set all your inserters to read their hand contents as a pulse.
4) Connect inserters from iron plate furnaces directly to the counter input. These add one to the counter each time they pull out a plate.
5) Connect inserters that pull iron plates off the line to the arithmetic combinator's input. These subtract one each time they pull off a plate.

Gustavbrain
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Jun 29, 2016 7:42 pm
Contact:

Re: Counting

Post by Gustavbrain »

I appreciate the help; thank you! Any other creative ways to do it are welcome as well :)

Post Reply

Return to “Gameplay Help”