Voteing? with dialog?

R

Rev. Coders

Guest
Well i want to put in a trigger that allows players to vote for which game type. The two types I am going to use is Capture the Flag and Team Kill. I want to make it so if 51% of the players that are users/playing click Team Kill, the Team Kill triggers are activeated, and same with Capture the Flag. Any Idea on how to do this?
 

Nexor

...
Reaction score
74
create triggers. one checks the number of votes, another checks after votes are made which type of game will be.
 

Zedzy

ℑΣÐℑΨ
Reaction score
41
You could set two integer variables CTF_Vote and TK_Vote. When a player clicks Capture the Flag (dialog button) it adds 1 to CTF_Vote and the same thing with TK_Vote. Then You would compare the two using an integer comparison CTF_Vote is greater than TK_Vote inside of a if/then/else action and then turn on the ctf triggers in the then statement, and put the team kill triggers in the else statement.

This Just checks if they are equal then randomizes it.

Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CTF_Vote Equal to TK_Vote
Then - Actions
Set RandomMode = (Random integer number between 0 and 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RandomMode Equal to 0
Then - Actions
Set CTF_Vote = (CTF_Vote + 1)
Else - Actions
Set TK_Vote = (TK_Vote + 1)
Else - Actions
Do nothing

Now for turning on the triggers:

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CTF_Vote Greater than TK_Vote
Then - Actions
Trigger - Turn on Melee Initialization <gen>
Trigger - Turn on Melee Initialization <gen>
Trigger - Turn on Melee Initialization <gen>
Trigger - Turn on Melee Initialization <gen>
Trigger - Turn on Melee Initialization <gen>
Else - Actions
Trigger - Turn on Melee Initialization <gen>
Trigger - Turn on Melee Initialization <gen>
Trigger - Turn on Melee Initialization <gen>
Trigger - Turn on Melee Initialization <gen>
Trigger - Turn on Melee Initialization <gen>



I also added in to randomize which one it is if they are equal. Hope this is what your looking for.

Peace.:cool:
 
R

Rev. Coders

Guest
ty fabioz and zedzy for the posts, both helping me ^_^
 

NullCurrent

( ゚ε ゚)
Reaction score
110
Hmmm. I never really thought of that. I guess I could add that in, but Im too lazy. But thank you for the complement.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top