• 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.

[Trigger] Dialog help please!!!!!!!!!!

Status
Not open for further replies.
Level 7
Joined
Nov 19, 2007
Messages
253
Ok im trying to make dialog that makes vote but i really don't know how to make vote and i don't know anything about dialog... heres how it looks like
  • Move A3 in
    • Events
      • Unit - A unit enters Arena III enter T1 <gen>
      • Unit - A unit enters Arena III enter T2 <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Dialog - Clear DialogA3
      • Dialog - Change the title of DialogA3 to Do You want enter C...
      • Dialog - Create a dialog button for DialogA3 labelled Yes
      • Set DialogButtonYes = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogA3 labelled No
      • Set DialogButtonNo = (Last created dialog Button)
      • Player Group - Pick every player in (All players) and do (Dialog - Show DialogA3 for (Picked player))
      • Game - Display to (All players) the text: All playes now have...
next
  • Move A3 Vote
    • Events
      • Dialog - A dialog button is clicked for DialogA3
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButtonYes
        • Then - Actions
          • Set DialogButtonYesNumber = (DialogButtonYesNumber + 1)
          • Game - Display to (All players) for 10.00 seconds the text: ((Colours[(Player number of (Triggering player))] + ((Name of (Triggering player)) + |r has accepted!)) + )
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButtonNo
        • Then - Actions
          • Set DialogButtonNoNumber = (DialogButtonNoNumber + 1)
          • Game - Display to (All players) for 10.00 seconds the text: ((Colours[(Player number of (Triggering player))] + ((Name of (Triggering player)) + |r has declined!)) + )
        • Else - Actions
and last one
  • Move A3 Inside
    • Events
      • Dialog - A dialog button is clicked for DialogA3
    • Conditions
    • Actions
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DialogButtonYesNumber Greater than or equal to ((Number of players in Players_Playing) / 2)
        • Then - Actions
          • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True) and ((((Owner of (Matching unit)) controller) Equal to User) and (((Matching unit) is A Hero) Equal to True)))) and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team1 Ress Castle <gen>), facing Default building facing degrees
              • Camera - Pan camera for (Owner of (Picked unit)) to (Center of Team1 Ress Castle <gen>) over 0.50 seconds
          • Set A3MovingUnitGroup[1] = (Last created unit group)
          • Custom script: call DestroyGroup (udg_A3MovingUnitGroup[1])
          • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) belongs to an ally of Player 7 (Green)) Equal to True) and ((((Owner of (Matching unit)) controller) Equal to User) and (((Matching unit) is A Hero) Equal to True)))) and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to (Center of Team2 Ress Castle <gen>), facing Default building facing degrees
              • Camera - Pan camera for (Owner of (Picked unit)) to (Center of Team2 Ress Castle <gen>) over 0.50 seconds
          • Set A3MovingUnitGroup[2] = (Last created unit group)
          • Custom script: call DestroyGroup (udg_A3MovingUnitGroup[2])
          • Countdown Timer - Pause Duel_timer
          • Countdown Timer - Hide Duel_timer_Window
        • Else - Actions
          • Game - Display to (Player group((Owner of (Entering unit)))) for 10.00 seconds the text: Other peoples didn'...
      • Set DialogButtonNoNumber = 0
      • Set DialogButtonYesNumber = 0
and when i click No i still move in the arena and i just tried alone without other players maybe its something wrong or i need to try with other peoples? thx for help ! :thumbs_up:
 
Level 5
Joined
Apr 12, 2007
Messages
158
Make a dialog button variable with arrays. The arrays can represent the choices in the dialog.

Example: Choice[1] = Yes
Choice[2] = No

That should fixed the first trigger on your post.
 
Level 7
Joined
Nov 19, 2007
Messages
253
Make a dialog button variable with arrays. The arrays can represent the choices in the dialog.

Example: Choice[1] = Yes
Choice[2] = No

That should fixed the first trigger on your post.

Its not working or i don't understand you :hohum:
 
Level 7
Joined
Nov 19, 2007
Messages
253
Srry it was my problem i needed to test it with more peoples and its working :) and still thanks for help!!!!!!!!
 
Last edited:
Level 21
Joined
Aug 21, 2005
Messages
3,699
I think this is your flaw:

DialogButtonYesNumber Greater than or equal to ((Number of players in Players_Playing) / 2)

When the number of playing players is 1, you'll do:
1 / 2 which results in 0 (since reals are rounded down when converted to integers).
In the case of 1 player voting no, you'll get that
# yes (0) = #players / 2 (0)
 
Status
Not open for further replies.
Top