A guide to using counters as parameters of a broadcast (to an extent)

So I was working on my chess project, and I thought of something. The one MAJOR issue with gimkit (in my opinion), is the lack of the ability to send parameters with broadcasts.

This is a basic workaround/explanation, and isn’t that complicated either.

If you have alot of buttons, such as this, then it can be a pain to detect which button you pressed without wasting alot of memory on triggers.

My solution is to wire or send a broadcast to a counter for each button, which updates a property. Each counter starts at a different value (you can use basically any value you want), and when it increments by one, the property updates.

You set a setting in the property so when it updates a trigger runs.
This trigger has block code to take that property and output whatever data you’d like based on the number.
So we can detect which button is pressed for 35 memory instead of using 550 memory.

If you don’t quite understand, then reach out and I’ll help!

3 Likes

Also @Blackhole927, you probably already knew this, but I was thinking about this and it might be possible to do your bitwise AND operation using a counter. We can say each counter represents a bit, so by chaining them together, you can in theory compare counters…

(Though it’s 100% impossible algebraically with looping through 1 by 1, since if you think about it, computer systems are BUILT in binary, so they can innately do this.)

2 Likes

Dang, very good guide, I never thought of it :sweat_smile:

2 Likes

Very cool guide @jjnitzan !

2 Likes

Don’t worry about it :slight_smile:
It took me way too long to think of this lol (literally hours), and I wouldn’t have thought of this without my current project, so yk, hope it’s useful to you one day!

2 Likes

Its good that you made a guide on this unspoken rule. Its kind of hard to put those things into words, probably a key to why there wasn’t a previous guide on this

1 Like

Maybe you can make 2D coordinates like in this guide?

1 Like

Helpful guide this should be bumped!

Just so you know, guides don’t need to be bumped after 5 hours, you can bump guides in 5 hours
Now back on topic

1 Like

Ok, good to know @THEHACKER120

1 Like