How To Make A Counter Decrease/Increase Every Second! [Mini-Guide 🤏]

This is another of the most frequently asked questions, and before anyone else makes a guide on this, here it is: this is how you make a counter increase or decrease every second! Let’s get started!

Using a Repeater To Decrease

This is pretty simple. First of all, you can either activate the repeater in many different ways: using a relay that listens for game start, a zone that starts it whenever a player enters the zone, or maybe just manually through channels! Let’s do just manually, like a teleporter.

Use a zone wired to a teleporter.
Player enters zone < teleport player here
Screenshot 2024-02-23 11.06.52 AM

Then, place down a repeater. You can start the repeater using channels or wires. For example, if you’re not a big fan of wasting memory on wires, use the channels. If you hate feeling mixed up with channels, use wires. Here are the ways to do that:

Wires

Wire the teleporter to the repeater.
Player teleported here < start repeater
Screenshot 2024-02-23 11.09.56 AM

Now for the task part. Change the repeater’s task interval to 1 second. And just below, set how long the repeater will count. For example, I’ll make it run for 30 seconds.
Screenshot 2024-02-23 11.16.29 AM

Time for the magic! Now, place down a counter. Don’t worry; these devices aren’t intimidating. As soon as you open the settings, it should say starting value Put how many seconds you want it to start from. (This has to be the same amount as the same task interval!)
Screenshot 2024-02-23 11.24.02 AM

Now, it’s time for the decreasing part. Use wires.

Wires

Wire the repeater to the counter.
Repeater runs task < decrement counter (Decrement means decrease/subtract)
Screenshot 2024-02-23 11.26.55 AM

Now it should work! Now to increase!

Using a Repeater To Increase

This is pretty simple and a little different from the other way. First, keep everything, wires and all. You will only have to change the settings of the devices.

First, in the counter, set the wire instead of decrement counter to increment counter.

Then, set the counter’s starting value to 0.
Screenshot 2024-02-23 11.43.47 AM

Now you’re done! It will now increase every second!

Extras

  • If you want it to stop a certain number, go to the Target section and set the target value to whatever you want; now it stops at this number!
  • Now if you want it only to go to the target value and stop, deactivate the zone when the player is either teleported, the target value is reached, or anything else!
  • Use this for counting and other functions!
  • Watch out for repeaters—they are not the best devices and cost a good amount of memory, especially block code. (Advanced tip)

Thanks for reading! Hopefully this helped!

GUIDE CREATOR DISCLAIMER

You don’t have to do something like this; if you get the general idea, that is fine. Any ideas or suggestions are to be announced or are mentioned in this guide. This is also not the only way, as there are other ways. This, in my opinion, is the easiest, but that is biased. :wave: Thanks. Buh-bye.

1 Like

Enjoy the guide.
Let me know if there is anything I should add or clarify.

2 ideas:

1: Use trigger clock intead of repeater.
2: Make a section on why this would be useful.

2 Likes

why

1 Like

Who do you mean?

why make this guide
and especially
why use repeaters :sob:

4 Likes

Ok, nevermind. Also, doesn’t this exist somewhere?

well, there are plenty of help topics that have the answer marked as a solution
but nobody has trouble doing this

3 Likes

I mean, that’s why I made this topic–to prevent the clutter of people asking the same thing over and over again. Just because everyone right now doesn’t have problems with this doesn’t mean they never will. But, yeah, I made this guide for that.