• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Voting system bugged

Status
Not open for further replies.
Level 7
Joined
Sep 19, 2012
Messages
204
Hey Guys,

I believe i already asked for help to this before, but it seems the Soultion people came up with doesnt work properly...so here i am again xD

The system should take in the Votes of every active player, setup the Game and then start the Timer.

For some reason it doesnt work properly and the Timer doesnt start. Without the Timer starting the map is unplayable since the whole map revolves around timed Phases.

  • Dialog creation
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Dialog - Clear Dialog1
      • Dialog - Change the title of Dialog1 to Time to first Arena
      • Dialog - Create a dialog button for Dialog1 labelled 30 Seconds
      • Set Dialog1_Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog1 labelled 40 Seconds
      • Set Dialog1_Button[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog1 labelled 50 Seconds
      • Set Dialog1_Button[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog1 labelled 60 Seconds
      • Set Dialog1_Button[4] = (Last created dialog Button)
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Dialog - Show Dialog1 for (Player((Integer A)))
      • Dialog - Clear Dialog2
      • Dialog - Change the title of Dialog2 to Time Increment afte...
      • Dialog - Create a dialog button for Dialog2 labelled 5 Seconds
      • Set Dialog2_Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog2 labelled 10 Seconds
      • Set Dialog2_Button[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog2 labelled 15 Seconds
      • Set Dialog2_Button[3] = (Last created dialog Button)
      • Dialog - Clear Dialog3
      • Dialog - Change the title of Dialog3 to Kill Bounty on?
      • Dialog - Create a dialog button for Dialog3 labelled Yes!
      • Set Dialog3_Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog3 labelled No!
      • Set Dialog3_Button[2] = (Last created dialog Button)
      • Dialog - Clear Dialog4
      • Dialog - Change the title of Dialog4 to Win Score
      • Dialog - Create a dialog button for Dialog4 labelled 10 Scorepoints
      • Set Dialog4_Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog4 labelled 20 Scorepoints
      • Set Dialog4_Button[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog4 labelled 30 Scorepoints
      • Set Dialog4_Button[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog4 labelled 40 Scorepoints
      • Set Dialog4_Button[4] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog4 labelled 50 Scorepoints
      • Set Dialog4_Button[5] = (Last created dialog Button)
      • Dialog - Clear Dialog5
      • Dialog - Change the title of Dialog5 to Start Gold
      • Dialog - Create a dialog button for Dialog5 labelled 100 Gold (Normal)
      • Set Dialog5_Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog5 labelled 250 Gold (Fast)
      • Set Dialog5_Button[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog5 labelled 500 Gold (Deathmatc...
      • Set Dialog5_Button[3] = (Last created dialog Button)
      • Trigger - Turn off (This trigger)
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
  • Dialog 2
    • Events
    • Conditions
    • Actions
      • Dialog - Show Dialog2 for (Player(temp_integer))
  • Dialog Vote
    • Events
      • Dialog - A dialog button is clicked for Dialog1
      • Dialog - A dialog button is clicked for Dialog2
      • Dialog - A dialog button is clicked for Dialog3
      • Dialog - A dialog button is clicked for Dialog4
      • Dialog - A dialog button is clicked for Dialog5
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Dialog1_Button[1]
        • Then - Actions
          • Set Time_Vote[1] = (Time_Vote[1] + 1)
          • Set temp_integer = (Player number of (Triggering player))
          • Trigger - Run Dialog 2 <gen> (checking conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Dialog1_Button[2]
            • Then - Actions
              • Set Time_Vote[2] = (Time_Vote[2] + 1)
              • Set temp_integer = (Player number of (Triggering player))
              • Trigger - Run Dialog 2 <gen> (checking conditions)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to Dialog1_Button[3]
                • Then - Actions
                  • Set Time_Vote[3] = (Time_Vote[3] + 1)
                  • Set temp_integer = (Player number of (Triggering player))
                  • Trigger - Run Dialog 2 <gen> (checking conditions)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Clicked dialog button) Equal to Dialog1_Button[4]
                    • Then - Actions
                      • Set Time_Vote[4] = (Time_Vote[4] + 1)
                      • Set temp_integer = (Player number of (Triggering player))
                      • Trigger - Run Dialog 2 <gen> (checking conditions)
                    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Dialog2_Button[1]
        • Then - Actions
          • Set Time_Increment_Vote[1] = (Time_Increment_Vote[1] + 1)
          • Set temp_integer = (Player number of (Triggering player))
          • Trigger - Run Dialog 3 <gen> (checking conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Dialog2_Button[2]
            • Then - Actions
              • Set Time_Increment_Vote[2] = (Time_Increment_Vote[2] + 1)
              • Set temp_integer = (Player number of (Triggering player))
              • Trigger - Run Dialog 3 <gen> (checking conditions)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to Dialog2_Button[3]
                • Then - Actions
                  • Set Time_Increment_Vote[3] = (Time_Increment_Vote[3] + 1)
                  • Set temp_integer = (Player number of (Triggering player))
                  • Trigger - Run Dialog 3 <gen> (checking conditions)
                • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Dialog3_Button[1]
        • Then - Actions
          • Set Bounty_Vote[1] = (Bounty_Vote[1] + 1)
          • Set temp_integer = (Player number of (Triggering player))
          • Trigger - Run Dialog 4 <gen> (checking conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Dialog3_Button[2]
            • Then - Actions
              • Set Bounty_Vote[2] = (Bounty_Vote[2] + 1)
              • Set temp_integer = (Player number of (Triggering player))
              • Trigger - Run Dialog 4 <gen> (checking conditions)
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Dialog4_Button[1]
        • Then - Actions
          • Set Win_Score_Vote[1] = (Win_Score_Vote[1] + 1)
          • Trigger - Run Dialog 5 <gen> (checking conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Dialog4_Button[2]
            • Then - Actions
              • Set Win_Score_Vote[2] = (Win_Score_Vote[2] + 1)
              • Trigger - Run Dialog 5 <gen> (checking conditions)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to Dialog4_Button[3]
                • Then - Actions
                  • Set Win_Score_Vote[3] = (Win_Score_Vote[3] + 1)
                  • Trigger - Run Dialog 5 <gen> (checking conditions)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Clicked dialog button) Equal to Dialog4_Button[4]
                    • Then - Actions
                      • Set Win_Score_Vote[4] = (Win_Score_Vote[4] + 1)
                      • Trigger - Run Dialog 5 <gen> (checking conditions)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Clicked dialog button) Equal to Dialog4_Button[5]
                        • Then - Actions
                          • Set Win_Score_Vote[5] = (Win_Score_Vote[5] + 1)
                          • Trigger - Run Dialog 5 <gen> (checking conditions)
                        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Dialog5_Button[1]
        • Then - Actions
          • Set Startgold_Vote[1] = (Startgold_Vote[1] + 1)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Dialog5_Button[2]
            • Then - Actions
              • Set Startgold_Vote[2] = (Startgold_Vote[2] + 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to Dialog5_Button[3]
                • Then - Actions
                  • Set Startgold_Vote[3] = (Startgold_Vote[3] + 1)
                • Else - Actions
  • Dialog Settings
    • Events
      • Dialog - A dialog button is clicked for Dialog5
    • Conditions
      • (Startgold_Vote[1] + (Startgold_Vote[2] + Startgold_Vote[3])) Equal to ((Number of players in (All players matching (((Matching player) slot status) Equal to Is playing))) - 1)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • Time_Vote[1] Greater than Time_Vote[2]
              • Time_Vote[1] Greater than Time_Vote[3]
              • Time_Vote[1] Greater than Time_Vote[4]
        • Then - Actions
          • Set Start_Time = 30.00
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Time_Vote[2] Greater than Time_Vote[1]
                  • Time_Vote[2] Greater than Time_Vote[3]
                  • Time_Vote[2] Greater than Time_Vote[4]
            • Then - Actions
              • Set Start_Time = 40.00
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Time_Vote[3] Greater than Time_Vote[1]
                      • Time_Vote[3] Greater than Time_Vote[2]
                      • Time_Vote[3] Greater than Time_Vote[4]
                • Then - Actions
                  • Set Start_Time = 50.00
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • Time_Vote[4] Greater than Time_Vote[1]
                          • Time_Vote[4] Greater than Time_Vote[2]
                          • Time_Vote[4] Greater than Time_Vote[3]
                    • Then - Actions
                      • Set Start_Time = 60.00
                    • Else - Actions
                      • Set Start_Time = 30.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • Time_Increment_Vote[1] Greater than Time_Increment_Vote[2]
              • Time_Increment_Vote[1] Greater than Time_Increment_Vote[3]
        • Then - Actions
          • Set Timer_Increment = 5.00
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Time_Increment_Vote[2] Greater than Time_Increment_Vote[1]
                  • Time_Increment_Vote[2] Greater than Time_Increment_Vote[3]
            • Then - Actions
              • Set Timer_Increment = 10.00
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Time_Increment_Vote[3] Greater than Time_Increment_Vote[1]
                      • Time_Increment_Vote[3] Greater than Time_Increment_Vote[2]
                • Then - Actions
                  • Set Timer_Increment = 15.00
                • Else - Actions
                  • Set Timer_Increment = 5.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • Bounty_Vote[1] Greater than Bounty_Vote[2]
        • Then - Actions
          • For each (Integer A) from 1 to 6, do (Actions)
            • Loop - Actions
              • Player - Turn Gives bounty On for (Player((Integer A)))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Bounty_Vote[2] Greater than Bounty_Vote[1]
            • Then - Actions
              • For each (Integer A) from 1 to 6, do (Actions)
                • Loop - Actions
                  • Player - Turn Gives bounty Off for (Player((Integer A)))
            • Else - Actions
              • For each (Integer A) from 1 to 6, do (Actions)
                • Loop - Actions
                  • Player - Turn Gives bounty On for (Player((Integer A)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • Win_Score_Vote[1] Greater than Win_Score_Vote[2]
              • Win_Score_Vote[1] Greater than Win_Score_Vote[3]
              • Win_Score_Vote[1] Greater than Win_Score_Vote[4]
              • Win_Score_Vote[1] Greater than Win_Score_Vote[5]
        • Then - Actions
          • Set Win_Score = 10
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Win_Score_Vote[2] Greater than Win_Score_Vote[1]
                  • Win_Score_Vote[2] Greater than Win_Score_Vote[3]
                  • Win_Score_Vote[2] Greater than Win_Score_Vote[4]
                  • Win_Score_Vote[2] Greater than Win_Score_Vote[5]
            • Then - Actions
              • Set Win_Score = 20
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Win_Score_Vote[3] Greater than Win_Score_Vote[1]
                      • Win_Score_Vote[3] Greater than Win_Score_Vote[2]
                      • Win_Score_Vote[3] Greater than Win_Score_Vote[4]
                      • Win_Score_Vote[3] Greater than Win_Score_Vote[5]
                • Then - Actions
                  • Set Win_Score = 30
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • Win_Score_Vote[4] Greater than Win_Score_Vote[1]
                          • Win_Score_Vote[4] Greater than Win_Score_Vote[2]
                          • Win_Score_Vote[4] Greater than Win_Score_Vote[3]
                          • Win_Score_Vote[4] Greater than Win_Score_Vote[5]
                    • Then - Actions
                      • Set Win_Score = 40
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • And - All (Conditions) are true
                            • Conditions
                              • Win_Score_Vote[5] Greater than Win_Score_Vote[1]
                              • Win_Score_Vote[5] Greater than Win_Score_Vote[2]
                              • Win_Score_Vote[5] Greater than Win_Score_Vote[3]
                              • Win_Score_Vote[5] Greater than Win_Score_Vote[4]
                        • Then - Actions
                          • Set Win_Score = 50
                        • Else - Actions
                          • Set Win_Score = 10
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • Startgold_Vote[1] Greater than Startgold_Vote[2]
              • Startgold_Vote[1] Greater than Startgold_Vote[3]
        • Then - Actions
          • For each (Integer A) from 1 to 6, do (Actions)
            • Loop - Actions
              • Player - Set (Player((Integer A))) Current gold to 100
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Startgold_Vote[2] Greater than Startgold_Vote[1]
                  • Startgold_Vote[2] Greater than Startgold_Vote[3]
            • Then - Actions
              • For each (Integer A) from 1 to 6, do (Actions)
                • Loop - Actions
                  • Player - Set (Player((Integer A))) Current gold to 250
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Startgold_Vote[3] Greater than Startgold_Vote[2]
                      • Startgold_Vote[3] Greater than Startgold_Vote[1]
                • Then - Actions
                  • For each (Integer A) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Player - Set (Player((Integer A))) Current gold to 500
                • Else - Actions
                  • For each (Integer A) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Player - Set (Player((Integer A))) Current gold to 100
      • Game - Display to (All players) the text: ((String(Start_Time)) + seconds until first Arena!)
      • Game - Display to (All players) the text: ((String(Timer_Increment)) + seconds added after each Arena!)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Gives bounty is on for (Triggering player)) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Kill Bounty is on!
        • Else - Actions
          • Game - Display to (All players) the text: Kill Bounty is off!
      • Game - Display to (All players) the text: ((String(Win_Score)) + Score needed to win!)
      • Game - Display to (All players) the text: ((String(((Triggering player) Current gold))) + Startgold!)
      • Trigger - Run Timer init <gen> (checking conditions)
      • Trigger - Run Scoreboard Init <gen> (checking conditions)
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )

Any Ideas?

greetings
CodeBlack
 
Level 9
Joined
Jul 30, 2018
Messages
445
I'm guessing it's because of the condition on Dialog 5. I don't even quite understand it. Why do you subtract one from the number on players? You might also run into a problem if a player leaves before it has voted, the whole game would get stuck, because the number of votes would never reach the amount of players. I would use just two variables, something like "VoteCount" and "PlayerCount". At the start of the game, set PlayerCount to the amount of players that are playing. Then when a player votes for the gold, increase "VoteCount" by 1. Then check if (VoteCount == PlayerCount). Also make a failsafe that if a player leaves, that will also decrease PlayerCount.

Also, as a side note: I'd make own triggers for each dialog, because even though dialogues might not be very demanding power-wise, it just kind of unnecessary to run all that code every time any button of any of the dialogues is clicked. Plus it would be a lot more easier to read. And now you have two triggers with the same event (button is clicked for dialog5), that could cause some conflict, if nothing else it's just kinda silly and a bad practice, when you could just check the things in the same trigger. Having the functions in the same trigger you could at least make sure all the functions are ran in the order you need them to be ran. Also, why have you put the "show dialog" in its own trigger?
 
Last edited:
Level 7
Joined
Sep 19, 2012
Messages
204
I'm guessing it's because of the condition on Dialog 5. I don't even quite understand it. Why do you subtract one from the number on players? You might also run into a problem if a player leaves before it has voted, the whole game would get stuck, because the number of votes would never reach the amount of players. I would use just two variables, something like "VoteCount" and "PlayerCount". At the start of the game, set PlayerCount to the amount of players that are playing. Then when a player votes for the gold, increase "VoteCount" by 1. Then check if (VoteCount == PlayerCount). Also make a failsafe that if a player leaves, that will also decrease PlayerCount.

Also, as a side note: I'd make own triggers for each dialog, because even though dialogues might not be very demanding power-wise, it just kind of unnecessary to run all that code every time any button of any of the dialogues is clicked. Plus it would be a lot more easier to read. And now you have two triggers with the same event (button is clicked for dialog5), that could cause some conflict, if nothing else it's just kinda silly and a bad practice, when you could just check the things in the same trigger. Having the functions in the same trigger you could at least make sure all the functions are ran in the order you need them to be ran. Also, why have you put the "show dialog" in its own trigger?

Well...seems i have been thinking way too complicated again...should work now (sadly cant test it in multiplayer right now)
I was substracting one from the total count of Players because the way i did it before the AI player i used for Unit Handling got counted in as well.
regarding the "show dialog" thingy: I HAVE NO CLUE:ugly: Made those triggers about 2 Years ago...so...who knows why xD

+REP Thanks Dude!

  • Dialog creation
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Dialog - Clear Dialog1
      • Dialog - Change the title of Dialog1 to Time to first Arena
      • Dialog - Create a dialog button for Dialog1 labelled 30 Seconds
      • Set Dialog1_Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog1 labelled 40 Seconds
      • Set Dialog1_Button[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog1 labelled 50 Seconds
      • Set Dialog1_Button[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog1 labelled 60 Seconds
      • Set Dialog1_Button[4] = (Last created dialog Button)
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Dialog - Show Dialog1 for (Player((Integer A)))
      • Dialog - Clear Dialog2
      • Dialog - Change the title of Dialog2 to Time Increment afte...
      • Dialog - Create a dialog button for Dialog2 labelled 5 Seconds
      • Set Dialog2_Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog2 labelled 10 Seconds
      • Set Dialog2_Button[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog2 labelled 15 Seconds
      • Set Dialog2_Button[3] = (Last created dialog Button)
      • Dialog - Clear Dialog3
      • Dialog - Change the title of Dialog3 to Kill Bounty on?
      • Dialog - Create a dialog button for Dialog3 labelled Yes!
      • Set Dialog3_Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog3 labelled No!
      • Set Dialog3_Button[2] = (Last created dialog Button)
      • Dialog - Clear Dialog4
      • Dialog - Change the title of Dialog4 to Win Score
      • Dialog - Create a dialog button for Dialog4 labelled 10 Scorepoints
      • Set Dialog4_Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog4 labelled 20 Scorepoints
      • Set Dialog4_Button[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog4 labelled 30 Scorepoints
      • Set Dialog4_Button[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog4 labelled 40 Scorepoints
      • Set Dialog4_Button[4] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog4 labelled 50 Scorepoints
      • Set Dialog4_Button[5] = (Last created dialog Button)
      • Dialog - Clear Dialog5
      • Dialog - Change the title of Dialog5 to Start Gold
      • Dialog - Create a dialog button for Dialog5 labelled 100 Gold (Normal)
      • Set Dialog5_Button[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog5 labelled 250 Gold (Fast)
      • Set Dialog5_Button[2] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog5 labelled 500 Gold (Deathmatc...
      • Set Dialog5_Button[3] = (Last created dialog Button)
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Equal to Is playing
            • Then - Actions
              • Set VoteCountPlayers = (VoteCountPlayers + 1)
            • Else - Actions
      • Trigger - Turn off (This trigger)
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
  • Dialog Vote 1
    • Events
      • Dialog - A dialog button is clicked for Dialog1
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Dialog1_Button[1]
        • Then - Actions
          • Set Time_Vote[1] = (Time_Vote[1] + 1)
          • Dialog - Show Dialog2 for (Triggering player)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Dialog1_Button[2]
            • Then - Actions
              • Set Time_Vote[2] = (Time_Vote[2] + 1)
              • Dialog - Show Dialog2 for (Triggering player)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to Dialog1_Button[3]
                • Then - Actions
                  • Set Time_Vote[3] = (Time_Vote[3] + 1)
                  • Dialog - Show Dialog2 for (Triggering player)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Clicked dialog button) Equal to Dialog1_Button[4]
                    • Then - Actions
                      • Set Time_Vote[4] = (Time_Vote[4] + 1)
                      • Dialog - Show Dialog2 for (Triggering player)
                    • Else - Actions
  • Dialog Vote 5 and Settings
    • Events
      • Dialog - A dialog button is clicked for Dialog5
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Dialog5_Button[1]
        • Then - Actions
          • Set Startgold_Vote[1] = (Startgold_Vote[1] + 1)
          • Set VoteCountAll = (VoteCountAll + 1)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to Dialog5_Button[2]
            • Then - Actions
              • Set Startgold_Vote[2] = (Startgold_Vote[2] + 1)
              • Set VoteCountAll = (VoteCountAll + 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Clicked dialog button) Equal to Dialog5_Button[3]
                • Then - Actions
                  • Set Startgold_Vote[3] = (Startgold_Vote[3] + 1)
                  • Set VoteCountAll = (VoteCountAll + 1)
                • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • VoteCountAll Greater than or equal to VoteCountPlayers
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Time_Vote[1] Greater than Time_Vote[2]
                  • Time_Vote[1] Greater than Time_Vote[3]
                  • Time_Vote[1] Greater than Time_Vote[4]
            • Then - Actions
              • Set Start_Time = 30.00
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Time_Vote[2] Greater than Time_Vote[1]
                      • Time_Vote[2] Greater than Time_Vote[3]
                      • Time_Vote[2] Greater than Time_Vote[4]
                • Then - Actions
                  • Set Start_Time = 40.00
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • Time_Vote[3] Greater than Time_Vote[1]
                          • Time_Vote[3] Greater than Time_Vote[2]
                          • Time_Vote[3] Greater than Time_Vote[4]
                    • Then - Actions
                      • Set Start_Time = 50.00
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • And - All (Conditions) are true
                            • Conditions
                              • Time_Vote[4] Greater than Time_Vote[1]
                              • Time_Vote[4] Greater than Time_Vote[2]
                              • Time_Vote[4] Greater than Time_Vote[3]
                        • Then - Actions
                          • Set Start_Time = 60.00
                        • Else - Actions
                          • Set Start_Time = 30.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Time_Increment_Vote[1] Greater than Time_Increment_Vote[2]
                  • Time_Increment_Vote[1] Greater than Time_Increment_Vote[3]
            • Then - Actions
              • Set Timer_Increment = 5.00
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Time_Increment_Vote[2] Greater than Time_Increment_Vote[1]
                      • Time_Increment_Vote[2] Greater than Time_Increment_Vote[3]
                • Then - Actions
                  • Set Timer_Increment = 10.00
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • Time_Increment_Vote[3] Greater than Time_Increment_Vote[1]
                          • Time_Increment_Vote[3] Greater than Time_Increment_Vote[2]
                    • Then - Actions
                      • Set Timer_Increment = 15.00
                    • Else - Actions
                      • Set Timer_Increment = 5.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Bounty_Vote[1] Greater than Bounty_Vote[2]
            • Then - Actions
              • For each (Integer A) from 1 to 6, do (Actions)
                • Loop - Actions
                  • Player - Turn Gives bounty On for (Player((Integer A)))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Bounty_Vote[2] Greater than Bounty_Vote[1]
                • Then - Actions
                  • For each (Integer A) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Player - Turn Gives bounty Off for (Player((Integer A)))
                • Else - Actions
                  • For each (Integer A) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Player - Turn Gives bounty On for (Player((Integer A)))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Win_Score_Vote[1] Greater than Win_Score_Vote[2]
                  • Win_Score_Vote[1] Greater than Win_Score_Vote[3]
                  • Win_Score_Vote[1] Greater than Win_Score_Vote[4]
                  • Win_Score_Vote[1] Greater than Win_Score_Vote[5]
            • Then - Actions
              • Set Win_Score = 10
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Win_Score_Vote[2] Greater than Win_Score_Vote[1]
                      • Win_Score_Vote[2] Greater than Win_Score_Vote[3]
                      • Win_Score_Vote[2] Greater than Win_Score_Vote[4]
                      • Win_Score_Vote[2] Greater than Win_Score_Vote[5]
                • Then - Actions
                  • Set Win_Score = 20
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • Win_Score_Vote[3] Greater than Win_Score_Vote[1]
                          • Win_Score_Vote[3] Greater than Win_Score_Vote[2]
                          • Win_Score_Vote[3] Greater than Win_Score_Vote[4]
                          • Win_Score_Vote[3] Greater than Win_Score_Vote[5]
                    • Then - Actions
                      • Set Win_Score = 30
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • And - All (Conditions) are true
                            • Conditions
                              • Win_Score_Vote[4] Greater than Win_Score_Vote[1]
                              • Win_Score_Vote[4] Greater than Win_Score_Vote[2]
                              • Win_Score_Vote[4] Greater than Win_Score_Vote[3]
                              • Win_Score_Vote[4] Greater than Win_Score_Vote[5]
                        • Then - Actions
                          • Set Win_Score = 40
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • And - All (Conditions) are true
                                • Conditions
                                  • Win_Score_Vote[5] Greater than Win_Score_Vote[1]
                                  • Win_Score_Vote[5] Greater than Win_Score_Vote[2]
                                  • Win_Score_Vote[5] Greater than Win_Score_Vote[3]
                                  • Win_Score_Vote[5] Greater than Win_Score_Vote[4]
                            • Then - Actions
                              • Set Win_Score = 50
                            • Else - Actions
                              • Set Win_Score = 10
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • Startgold_Vote[1] Greater than Startgold_Vote[2]
                  • Startgold_Vote[1] Greater than Startgold_Vote[3]
            • Then - Actions
              • For each (Integer A) from 1 to 6, do (Actions)
                • Loop - Actions
                  • Player - Set (Player((Integer A))) Current gold to 100
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • Startgold_Vote[2] Greater than Startgold_Vote[1]
                      • Startgold_Vote[2] Greater than Startgold_Vote[3]
                • Then - Actions
                  • For each (Integer A) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Player - Set (Player((Integer A))) Current gold to 250
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • And - All (Conditions) are true
                        • Conditions
                          • Startgold_Vote[3] Greater than Startgold_Vote[2]
                          • Startgold_Vote[3] Greater than Startgold_Vote[1]
                    • Then - Actions
                      • For each (Integer A) from 1 to 6, do (Actions)
                        • Loop - Actions
                          • Player - Set (Player((Integer A))) Current gold to 500
                    • Else - Actions
                      • For each (Integer A) from 1 to 6, do (Actions)
                        • Loop - Actions
                          • Player - Set (Player((Integer A))) Current gold to 100
          • Game - Display to (All players) the text: ((String(Start_Time)) + seconds until first Arena!)
          • Game - Display to (All players) the text: ((String(Timer_Increment)) + seconds added after each Arena!)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Gives bounty is on for (Triggering player)) Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: Kill Bounty is on!
            • Else - Actions
              • Game - Display to (All players) the text: Kill Bounty is off!
          • Game - Display to (All players) the text: ((String(Win_Score)) + Score needed to win!)
          • Game - Display to (All players) the text: ((String(((Triggering player) Current gold))) + Startgold!)
          • Trigger - Run Timer init <gen> (checking conditions)
          • Trigger - Run Scoreboard Init <gen> (checking conditions)
          • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
        • Else - Actions
 
Status
Not open for further replies.
Top