Mode voting system?

Brian12693

New Member
Reaction score
0
Does anyone know how to create a voting system where every player in the map has the option to vote for 1 out of 3 modes and which ever mode is voted for the most is the one going to be set? Thanks!
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Yes, use dialog and dialog buttons.
Variables:
Dialogue: Mode
Dialogue: ModeButton -- Set this with an array of 3, and search in Google on how to do it.
 

Brian12693

New Member
Reaction score
0
Yes, use dialog and dialog buttons.
Variables:
Dialogue: Mode
Dialogue: ModeButton -- Set this with an array of 3, and search in Google on how to do it.


Thanks for the reply. But I tried Google already and didn't find anything. I wouldn't have asked here if I found my answers in Google.
 

Solu9

You can change this now in User CP.
Reaction score
216
You need 2 standard triggers and 1 for each mode you want.

Trigger 1:
Events - Map Initialization
Conditions -
Actions -
Create a dialog
Set Dialog_Variable to last created dialog
Create dialog buttons equal to the amount of modes you want.
Set Dialog_ButtonX to last created dialog button

Trigger 2:
Events - Time elapsed equal to 0.1 seconds (I presume you want the player to pick modes from the start of the map)
Conditions -
Actions -
Show Dialog_Variable

Trigger 3+: (create as many as you have modes)
Events - A dialog button for dialog is clicked
Conditions - Dialog button equal to dialog button X
Actions -
Run whatever a "mode" entrails here.


Needed Variables:
-A dialog variable
-Dialog buttons equal to the number of modes

I hope you understand the pseudo code.
 

Brian12693

New Member
Reaction score
0
You need 2 standard triggers and 1 for each mode you want.

Trigger 1:
Events - Map Initialization
Conditions -
Actions -
Create a dialog
Set Dialog_Variable to last created dialog
Create dialog buttons equal to the amount of modes you want.
Set Dialog_ButtonX to last created dialog button

Trigger 2:
Events - Time elapsed equal to 0.1 seconds (I presume you want the player to pick modes from the start of the map)
Conditions -
Actions -
Show Dialog_Variable

Trigger 3+: (create as many as you have modes)
Events - A dialog button for dialog is clicked
Conditions - Dialog button equal to dialog button X
Actions -
Run whatever a "mode" entrails here.


Needed Variables:
-A dialog variable
-Dialog buttons equal to the number of modes

I hope you understand the pseudo code.

Thanks a lot! I don't fully understand them but I'll try to find my way around it. And thanks again! :D
 

Solu9

You can change this now in User CP.
Reaction score
216
Oh yeah you're welcome. Though I misunderstood your question a bit. The answer I gave just enables a player to "pick" a mode.
You wanted to make all players able to "vote" for a mode.

If you decide to go with what I wrote, good.
If you need an actual voting system, please say so and I'll come up with something.
 

Brian12693

New Member
Reaction score
0
Oh yeah you're welcome. Though I misunderstood your question a bit. The answer I gave just enables a player to "pick" a mode.
You wanted to make all players able to "vote" for a mode.

If you decide to go with what I wrote, good.
If you need an actual voting system, please say so and I'll come up with something.

Well... an actual voting system for all players to vote for a mode would be awesome, hehe >< I would greatly appreciate that
 

Solu9

You can change this now in User CP.
Reaction score
216
Not exactly how I would have done it, but it seems nice :)

Btw Brian12693, you can simply copy the trigger folder from KaerfNomekop's map to your map. That will save you a lot of time.
Just remember to go to File -> Preferences and check the box that says "Automatically create unknown variables while pasting trigger data".
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top