Comparing Counter-Properties (Finished)

This guide will show you how to compare counter-properties WITHOUT USING BLOCKS. This is part of a series of guides that aims to make blocks almost obsolete by using counters.

Concept

This is going to subtract from both counters until one or both of them hit 0 and then, the system will act accordingly. If the 2nd property is higher, then it will return 0, if the 1st property is higher it will return 1, and if they’re equal, it returns 2.

Guide

First, you need a channel broadcast that starts this process. I’ll use the channel broadcast “compare”.

Next, use this guide to copy the values of your 2 counters over to 2 other counters when receiving on “compare”. Call the 2 new counters Counter 1 and Counter 2.

Make a trigger that receives on “compare”. Wire this to another trigger (from now on called the “recursing trigger”. It should broadcast on “subtract” and receive on “subtract”. If you think your counters are going to have values bigger than 295, add a delay to the recursing trigger. The recursing trigger should also activate on “compare”.

Make both counters 1 and 2 go down when receiving on “subtract”. Make both have a target of 0. Make both counter deactivate the recursing trigger when they reach the target. Make counter 1 broadcast on “counter1zeroed” when reaching the target of 0 and it should reset to 0 when receiving on “compare”. Do the same for counter 2 but with the target reached channel name different. Make another trigger that deactivates on “compare”. This trigger should activate on “counter1zeroed” and trigger on “counter2zeroed”. Make a counter (the counter with the result) that has a default of 0 and resets on “compare”. This counter should increment on “counter2zeroed”. Wire the trigger that receives on “counter1zeroed” to that counter to increment the counter.

And there! You can make the counter with the result edit a property if you want to use checkers.

By replying to this topic, you acknowledge that you have read the entire first post and have at least skimmed through the replies to this topic. You also acknowledge that this means that you know what you are posting about. Asking for definitions of non-GKC unique words is not allowed. Google is a great resource for that.

4 Likes

I’m just going to keep it here and say when I finished it.

Oh Ok. I added wip

Still, maybe delete the “I accidentally posted this guide”

The wip tag isn’t really needed because no one is going to search up unfinished guides. That bit of info can be in the title.

True. Though people still like to use it. :slight_smile:

Also:
Off-topic-ish:
You know how all the HUNGER GAMES games in Discovery aren’t accurate? I think I’m going to post the Ultimate Hunger Games guide when I finish mine.

nice guid @getrithekd :+1:

1 Like

One month later bump