Map Difficulty vote kind of, HELP!

Zorobay

Member
Reaction score
1
Hi.

Sorry for the Title, but i need help with the difficulty system on my map. At the beginning of the map, their will be a dialog showing up, asking you what map difficulty you would like. By now, it changes each time a button is pressed (Hard, Easy etc) But playing that online wont work, so i need a working script to enable the option that most player choose. Please feel free to explain what the script does, because i can imagine it will be rather complicated. TY!!
 

Curo

Why am I still playing this game...?
Reaction score
109
You're going to want to use integers to keep track of the votes. For example, if a player clicks the "hard" dialogue box, set HardVotes = HardVotes +1. HardVotes would of course be an integer variable with an initial value of 0. Then you would use if/and-then statements to compare the size of the integers, and set the difficulty to the one with the most votes.

Alternatively, you could assign each difficulty an integer, and average out the votes. So say you had 3 difficulties: easy, normal, and hard. Easy = 1, Normal = 2, Hard = 3. Whenever someone clicks the hard dialogue button, you would set an integer variable (let's call it TotalVotes) to TotalVotes + 3. Then once all players have clicked the dialogue box (or a time elapses, if you want to have a time limit), do TotalVotes/number of players. Then round this result to the nearest integer.

For example, say you have 6 players and they vote as follows: 2 easy, 3 normal, 1 hard.
2x easy = 2x1
3x normal = 3x2
1x hard = 1x3
6 votes total = 11
11/6 players = ~2, so difficulty is set to normal

The averaging method may be more "fair", but you could also get people voting easier/harder than the mode they want to try and outweigh votes that others place. This can get messy and give everyone a mode they don't want. Most games just use the tally mode that I gave you first.
 

Zorobay

Member
Reaction score
1
You're going to want to use integers to keep track of the votes. For example, if a player clicks the "hard" dialogue box, set HardVotes = HardVotes +1. HardVotes would of course be an integer variable with an initial value of 0. Then you would use if/and-then statements to compare the size of the integers, and set the difficulty to the one with the most votes.

How will I script that??
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top