• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Need help with Vote Dialogs

Status
Not open for further replies.
Level 7
Joined
Apr 3, 2009
Messages
317
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
317
  • 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