Map voting question part 2

Continuing the discussion from Map voting question:

So Kosm0-o gave me that response, but I did not understand it well. Could someone give me an explanation of that or just give a new solution?

What do you understand about this explanation so far? Just making sure so you can get a more efficient answer.


the entire setup/notation of the solution…
(edit: just read your bio lol sry)

Prior warning that this is going to be lengthy, but that’s to make the explanation as simple to understand as possible. Don’t be intimidated by the length.

Place a button. Set the “scope” setting to “player.” Set it to send a signal on a channel called “PlayerVoted.” Set a trigger to trigger when receiving on that channel, then set it to send a signal on a channel called “DeactivateVoting” when it is triggered. Set the button to deactivate when receiving on that channel. Duplicate the button until you have a button for every map. When you press any button, it will trigger the trigger, which will send signals that deactivate every button. Since the scope= player, the buttons will only deactivate for the player that pressed it. This keeps players from voting multiple times.

Then, to create a property and alter its properties, place a property device. Set “property type” to “number,” and its scope should be set to “global” by default. Duplicate the property device until you have one device per map. Set each property devices’ property name to a different map, then put "voting at the end. For instance, if you have two maps that are called Map 1 and Map 2, there will be two property devices. The first device will be set to “Map 1 Voting,” and the second will be set to “Map 2 Voting.” This will make sure the counters are able to update the properties, and that the property counts will apply for everyone.

Place a counter. Set it to update a property via the “property” tab, then duplicate it so you have one counter per map. Each counter should be designated to a map. The property they update should be set to “[Their respective map] Voting,” which are the properties you made. Each button should be set to their own counter. (Button pressed-> Increment counter.) The buttons will trigger their respective counters to increment, which is how the voting is tracked.

Build a timer by having a counter that has its default value set to however long you would like the voting to last. Set the counter to have a target value, then set that to 0. Connect the counter to a checker (Target value reached → trigger.) Connect a wire repeater to the counter (_-> decrement counter). Let’s call that Wire Repeater 1. You would then place a new wire repeater and connect Wire Repeater 1 to it. Let’s call the new one Wire Repeater 2. Connect Wire Repeater 2 to Wire Repeater 1. Set Wire Repeater 1’s delay to 1. Connect whatever device(s) triggers the meeting to Wire Repeater 1. Wire Repeater 1 will trigger when the meeting is triggered. Since it has a delay of 1, it will wait one second before sending signals through its wires. It will trigger the counter, which would cause it to decrement its current value. Wire Repeater 1 will also trigger Wire Repeater 2, which in turn will trigger Wire Repeater 1, keeping the counter system running. The counter will trigger the checker when time runs out.

Build a player counter if you don’t have one (there are guides out there if you need them.) Make sure its counter device tracks a property if it hasn’t already. (Don’t forget to place a property device for that property and set its type to “number” so it works properly. Keep this in mind whenever you need a property to be updated by a counter.) I’ll call the property “PlayerCount” in the rest of this explanation, but don’t worry if you named it something else.

Place a counter, and set it to increment when receiving on the channel “PlayerVoted.” Set it to update the property “TotalVotes” (make sure it’s a number property.) This system indicates the total amount of players that have voted.

(I have to go, I’ll ping you when I update this.)
(Uh I kind of misread your reply, I think I wrote way more than I needed to. Oops.)


Thanks, but one issue: They’ll be around 6 or 7 maps.

Thanks for explaining better NavyCatZ!
@Kormorant . How is there being 6 or 7 maps an issue?

1 Like

but I may have found a solution using part of @NavyCatZ’s solution.

It’s block code.

if you don’t understand my block code then just look at it without all the extra symbols (i was trying to not get rusty at js… sorry)

I still need help here

i dont know what you still need help on