• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Need help with Vote Dialogs

Status
Not open for further replies.
Level 7
Joined
Apr 3, 2009
Messages
318
How can I make dialogs for voting on Hard or Easy mode in the game I am currently making? Thanks :cool:

Example:
Teal, Blue and Red vote for Easy Mode
Orange, Yellow, Brown, Light Blue, Green and the others vote for Hard Mode

Hard Mode will be picked.

How can I do this with triggers? Thanks once again :thumbs_up:
 
  • Trigger
  • Events
    • Dialog - A button is clicked for VoteGameDifficulty
  • Conditions
  • Actions
    • Set Count = (Count + 1)
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (Clicked dialog Button) Equal to Easy
      • Then - Actions
        • Set Easy = (Easy + 1)
      • Else - Actions
        • Set Hard = (Hard + 1)
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • Count Equal to (PlayersCount)
      • Then - Actions
        • Player Group - Pick every player in (All players) and do (Actions)
          • Loop - Actions
            • Dialog - Hide VoteGameDifficulty for (Picked player)
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • Easy Greater than Hard
          • Then - Actions
            • Game - Set game difficulty to Easy
          • Else - Actions
            • Game - Set game diffculty to hard
It should be something like this.

All comparisons are Integer Comparisons. (PlayerCount) is an integer variable that has the number of users currently playing.
It should come from a trigger like this:
  • Set Temp_Force = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
  • Set PlayerCount = (Number of players in Temp_Force)
  • Custom script: call DestroyForce (udg_Temp_Force) --> Optional
 
Level 7
Joined
Apr 3, 2009
Messages
318
  • Trigger
  • Events
    • Dialog - A button is clicked for VoteGameDifficulty
  • Conditions
  • Actions
    • Set Count = (Count + 1)
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (Clicked dialog Button) Equal to Easy
      • Then - Actions
        • Set Easy = (Easy + 1)
      • Else - Actions
        • Set Hard = (Hard + 1)
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • Count Equal to (PlayersCount)
      • Then - Actions
        • Player Group - Pick every player in (All players) and do (Actions)
          • Loop - Actions
            • Dialog - Hide VoteGameDifficulty for (Picked player)
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • Easy Greater than Hard
          • Then - Actions
            • Game - Set game difficulty to Easy
          • Else - Actions
            • Game - Set game diffculty to hard
It should be something like this.

All comparisons are Integer Comparisons. (PlayerCount) is an integer variable that has the number of users currently playing.
It should come from a trigger like this:
  • Set Temp_Force = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
  • Set PlayerCount = (Number of players in Temp_Force)
  • Custom script: call DestroyForce (udg_Temp_Force) --> Optional

Thanks alot +Rep!
 
Status
Not open for further replies.
Top