Voting System

Hey there, i am new to UEFN and completely new to coding/ verse. i am looking for a voting system that has a total of 9 options for now. and each round the players will be asked to vote out of a random 3 from the original 9. What they are voting for is mainly loadouts, but i will use the “when triggered” to add some effects that are needed. This can either be UI lie the one in the minigames box fights or what i thin an easier version in the circle that players go into and vote. I just need to know what to do because i have not found a way to do these nor have i found tutorials.

1 Like

Heres a voting snippet by Imaginary

and the related Youtube Tutorial

2 Likes

The problem with this is that it cant pick 3 out of 9 randomly to be represented each map. And that’s not something i can make as a new user. Don’t get me wrong, I have been looking for a way for a long time.

I’ll try and help you figure it out.

For the loadout sets, are you using Classes ? I reckon that would be easier to implement than item granter sets.

To vote at the start of each round, I assume you have a seperate voting area,
so setting a default class and reverting to default class at end of round in Island Settings, would spawn all at the voting area at the start of game and each round.
Setting the voting area spawnpads to only allow the default class and Priority Group 1 would achieve that.

Number of players in a circle to vote sounds cool, and a series of RNG devices or maybe the RNG snippet would be able to enable/disable the relevent class selectors, voting system…Yes this is the most difficult part to sort out, will be fun

What type of gameplay do you have, last man standing, elimination count, time based ?

This will make everything clearer, the map is a minigame map, the players will have a choice to pick from 3 minigames at the start of each round, the minigames will have different loadouts and effect on the player like speed, flight etc… I still have not made the loadouts since i need to figure out how ill link these loadouts to the voting system.

I wanted the pop up voting system to begin with, but that seems to hard for me as a beginner + nobody would give the ready code. So the problem with the one you sent is just the randomization part where i want random 3 out of the 9 modes ( will increase over time) to be shown to the players at the start of each round.

At the beginning of the round the voting buttons will spawn Infront of them, as i said, 3 buttons.

Ok, so you’ll definately want to be using Class Designers for each minigame, the versatility of loadout, player based settings and the ability to only spawn on Class specified pads. Which allows respawning when needed in the relevent minigame area.

The best way I feel in a minigame setting to change class is by using Player Reference Devices, the voting system result enables the desired class selector and disables all the others,
then an event, like a post vote timer, activates all the player references,
all the class selectors use the change player to class function, from the player refs on activated event, but only the enabled class selector counts.

Im still a bit hmmmm on the random buttons, getting the random buttons is less of an issue than managing which ones have been chosen and removing them from the random choice, unless your happy to repeat the same minigame if chosen.

Having all 9 modes available to choose from, using a time based, players fighting over “last button standing” is easiest method, each button enables one class selector and teleporter set and disables all others. Near the end of the round can also Hide the Button for that minigame removing it from the choices.

My logic here is a bit foggy… I was thinking maybe enabling/disabling sets via the amount of possible combinations of 3 out of 9, but that is 84 different results, a lot of work with the random generator in the Verse Snippets.
Then thinking to get 3 different results in a sequence, the first random button is straight forward, 9 choices, the next random button is 8 choices, but each of the 9 choices requires reference to a different 8, and then each 8 has a different set of 7, holy … thats 504 random generators.

I’m probably overthinking it or missing something, but at the moment I think creating verse code to deal with this the best option, but 84 triggers from the RNG in Snippets is feasible…

1 Like

Hopefully I understand what you are trying to build. I think I do!

You can do it ‘simple’ with random generator.

You can also use ‘shuffle’ function inside your verse device. I think you have an array with the 9 different minigames. You can shuffle the array and then in your ‘make canvas’ function or whatever you have, then you can show only 3 of the shuffled arrays.

If you have your minigames in an array called ‘VotingCandidates’:
Then you can shuffle the VotingCandidates like this: ShuffledCandidates := Shuffle(VotingCandidates).
Then in the function where you show the candidates to the player, then use ‘Shuffledcandidates’.
You need to make more changes than I mentioned. You also need to change how the votes are counted sort of.

Hope this makes sense! Otherwise let me know. I think this is a good way of creating the Voting UI, and gives you a good understanding of Verse :smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.