I’m kinda confused what this would look like (i have been playing around with this for an hour)
Blackhole's block code post
"As of right now (May 28, 2023) there is currently no built in way to make lists in gimkit creative. However, if we get creative, we can make our own lists. The Idea: You’ll notice when you place a get property block, the property name is just a text object. We can use this to our advantage, with the create text block. By creating multiple properties, each named item.0, item.1, item.2, we can make some text with the create text block that matches the property name of the item we’re trying to gra…
[/quote]
Then, make sure your voting properties all have a naming scheme like “p1votes”, “p2votes”, “p3votes” etc.
Place a repeater, and wire it to a trigger. Then place a property and name it '‘i’ or something like that.
Make the repeater repeat 10 times, and then go to the trigger and enter block code.
Then write the following code:
#store the property name in a varible called name
name = create_text("p1", get_property(i), "votes")
#check if the value of name is greater than the highest votes so far
if (get_property(name) > get_property("highest")):
#if so, update the highestName and highestValue properties.
set_property("highestName", name)
set_property("highestValue", get_property(name))
#increase i to check the next property
set_property("i", get_property("i")+1)
#A check to reset the "i" property when all properties have been checked.
if (get_property("i") == 10):
set_property("i", 0)
Give me a second. I don’t have access to GKC, so maybe @Haiasi could get you a picture? What he is doing is checking if a property is heigher than a certain value (stars at 0), if it is, set that value to the property, and repeating the process for every property.
What this does is basically loop itself until it reaches the maximum index value & find the property with the highest value and sets the index to 0 and broadcasts the result statement after it reaches the end of the index, make sure you set (getProperty(# of numbered properties)) to the amount of p1(indexes)votes you have and make sure there are properties named p1(index)votes or for example:
p11votes,
p12votes,
p13votes,
etc, etc do this so that the blockcode can read the value of those properties and to find the highest among them. (do whatever you want with the Send Vote Results channel, like finding who got voted out or smth) PS: you can set the # of numbered properties to 10 like in your example.