# Can someone help me find a more efficient solution?

For the 5000th help post (amazing, I know):

(Pretend that 999999999999999 is N).

I’m trying to make the general case of decrementing a counter by N. If you want to know anything about this system, please just ask! I’m trying to make a more efficient version!

KingDDD :0 What is that system for? (nevermind, you said that)

1 Like

It decrements the top counter by whatever the bottom counter is!

All hail the king

1 Like

So like in Counter Copying?

I’ll look at this if I have a chance but it’s hard to make a counter display a given value would text work instead?

To be honest, I have never seen this before. No, @CassiusDoomlorde, this is something different that I totally haven’t been thinking about doing since May and only got around to it now.

I have an idea. In the bottom counter, make it track a property. In a trigger, make a different property have the same value as the property in the counter. Have it check “if noncounter property > 0, do broadcast message on channel to the top counter, and subtract the noncounter property by 1.” Connect that trigger to a wire repeater, and the wire repeater to a trigger. This could work as long as you don’t use a negative number in the counter.

1 Like

It almost works. My brain is melting looking at this code (just got back from vacation and had school the day after, head hurts), so I’ll leave this open.

You are trying to make a for loop.

OH MY GOD WE CAN MAKE A FOR LOOP

STORE IN TRIGGER ACTIVATION STATES

USE BLOCKS TO CHECK

HOLY-

HOW DID WE NOT COME UP WITH THIS EARLIER???

give me a second I’ll make a design

1 Like

How to make a for loop: (typing on phone so this will be a limited desc)

A) make a number property
B1) have a trigger, receive on B, send on A
B2) trigger has blocks: if property is 0, broadcast on C, else, subtract one from property
C) create second trigger, R: A, S: B, deactivate on C

wowzers, thats surprisingly easy!

2 Likes

Are you going to make a guide on this? It seems kinda revolutionary for technical gimkit.

Also where does the counter come into play in your steps

Yes, later.

And the counter can just be triggered by channels A or B.

What does this mean?

Receive on A, send on B
[channels]

1 Like

We really need standardized notation.
But yes, CD is right

Wait, why is this in Help?

I’m trying to push names for simple device systems to make explaining them faster.

Like triggerloop.

1 Like

I need Help with making this better. It works, but not as nice as I want it to. No block code though!

2 Likes

Oh wait, you don’t need block code.
HOLY

Yeah, so swapping out the block code/second trigger for a checker works well too!
This is insane.

And I could’ve tried to make this back in June…