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

Dialog at the same time for alot of people

Status
Not open for further replies.
Level 2
Joined
Jun 28, 2004
Messages
8
Code:
Apprentice
    Events
        Unit - A unit Gains a level
    Conditions
        ((Hero level of (Leveling Hero)) Greater than or equal to 10) and ((Unit-type of (Leveling Hero)) Equal to Warrior)
    Actions
        Unit - Pause (Leveling Hero)
        Unit - Make (Leveling Hero) Invulnerable
        Dialog - Clear Dialog[(Player number of (Owner of (Leveling Hero)))]
        Dialog - Change the title of Dialog[(Player number of (Owner of (Leveling Hero)))] to New Class:
        Dialog - Create a dialog button for Dialog[(Player number of (Owner of (Leveling Hero)))] labelled Holy Warrior
        Set DialogButtonWarrior[1] = (Last created dialog Button)
        Dialog - Create a dialog button for Dialog[(Player number of (Owner of (Leveling Hero)))] labelled Champion
        Set DialogButtonWarrior[2] = (Last created dialog Button)
        Dialog - Show Dialog[(Player number of (Owner of (Leveling Hero)))] for (Owner of (Leveling Hero))

That code isn't working so good. In my map there is a chance that alot of people get level at the same time, then this trigger doesn't work anylonger. Do anyone know how to make a dialog work for many people at the same time?

The Problem: When 2 or more heroes get level 10 at the same time, then the buttons only work for ONE single person. No one else.
 
Level 14
Joined
Jan 15, 2007
Messages
349
If you work with GUI those things are really hard to make. But I think I have the solution! If you want to have a dialog which work for more players at the same time.

  • ACC
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • ((Level of Aas-Schwarm for (Triggering unit)) Greater than or equal to 10) and ((Unit-type of (Triggering unit)) Equal to Schreckenslord)
    • Actions
      • Unit - Pause (Triggering unit)
      • Unit - Add Unverwundbar (Neutral) to (Triggering unit)
      • Dialog - Clear Dialog[(Player number of (Owner of (Triggering unit)))]
      • Dialog - Change the title of Dialog[(Player number of (Owner of (Triggering unit)))] to New Class:
      • Dialog - Create a dialog button for Dialog[(Player number of (Owner of (Triggering unit)))] labelled Holy Warrior
      • Set DialogButton[((Player number of (Owner of (Triggering unit))) x ((Player number of (Owner of (Triggering unit))) + 1))] = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog[(Player number of (Owner of (Triggering unit)))] labelled Champion
      • Set DialogButton[((Player number of (Owner of (Triggering unit))) x ((Player number of (Owner of (Triggering unit))) + 2))] = (Last created dialog Button)
      • Dialog - Show Dialog[(Player number of (Owner of (Triggering unit)))] for (Owner of (Triggering unit))
And the trigger which react ,when you have pressed a button, must look like this:

  • AAD
    • Events
      • Dialog - A dialog button is clicked for Dialog[1]
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButton[((Player number of (Triggering player)) x ((Player number of (Triggering player)) + 1))]
        • Then - Actions
          • Game - Display to (All players) the text: Warrior
          • // Your Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to DialogButton[((Player number of (Triggering player)) x ((Player number of (Triggering player)) + 2))]
            • Then - Actions
              • Game - Display to (All players) the text: Champion
              • // Your Actions
            • Else - Actions
I hope I helped you!
 
Status
Not open for further replies.
Top