• 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

Status
Not open for further replies.

Celalith

C

Celalith

First of all, Hi!

I want to make a dialog, that shows a specific message to the players who are in the specific regions - 2 different regions. As in player 1 unit enters a region called "One" and player 2 unit enters the region called "Two". Both of the regions are close to each other. If both player's units are in place, show the message to owners of the units, and if both players make the same decision - as in press Yes or No -, then create a item - if one of them pressed no, then don't create item.

Don't blame me if you don't understand a word of it.
It's was hard enough to write it, but now to understand it.
 

Celalith

C

Celalith

Easier said then done. Please show me, because It seems that you know how to do it and I don't.
I mean the triggering thing. I know how to clear.
 
Level 20
Joined
Jun 27, 2011
Messages
1,864
Didn't test this on multiplayer. Hope it works.

  • One
    • Events
      • Unit - A unit enters One <gen>
    • Conditions
    • Actions
      • Set Temp_Unit = (Triggering unit)
      • Set Temp_Player = (Owner of Temp_Unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_Player Equal to Player 1 (Red)
        • Then - Actions
          • Set UnitInRegion[1] = True
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UnitInRegion[2] Equal to True
            • Then - Actions
              • Dialog - Clear Temp_Dialog
              • Dialog - Change the title of Temp_Dialog to Item
              • Dialog - Create a dialog button for Temp_Dialog labelled Yes
              • Set Dialog_Button[1] = (Last created dialog Button)
              • Dialog - Create a dialog button for Temp_Dialog labelled No
              • Set Dialog_Button[2] = (Last created dialog Button)
              • Dialog - Show Temp_Dialog for Player 1 (Red)
              • Dialog - Show Temp_Dialog for Player 2 (Blue)
            • Else - Actions
        • Else - Actions
      • Custom script: set udg_Temp_Unit = null
  • Two
    • Events
      • Unit - A unit enters Two <gen>
    • Conditions
    • Actions
      • Set Temp_Unit = (Triggering unit)
      • Set Temp_Player = (Owner of Temp_Unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_Player Equal to Player 2 (Blue)
        • Then - Actions
          • Set UnitInRegion[2] = True
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UnitInRegion[1] Equal to True
            • Then - Actions
              • Dialog - Clear Temp_Dialog
              • Dialog - Change the title of Temp_Dialog to Item
              • Dialog - Create a dialog button for Temp_Dialog labelled Yes
              • Set Dialog_Button[1] = (Last created dialog Button)
              • Dialog - Create a dialog button for Temp_Dialog labelled No
              • Set Dialog_Button[2] = (Last created dialog Button)
              • Dialog - Show Temp_Dialog for Player 1 (Red)
              • Dialog - Show Temp_Dialog for Player 2 (Blue)
            • Else - Actions
        • Else - Actions
      • Custom script: set udg_Temp_Unit = null
  • Run
    • Events
      • Dialog - A dialog button is clicked for Temp_Dialog
    • Conditions
      • (Clicked dialog button) Equal to Dialog_Button[1]
    • Actions
      • Set Temp_Int = (Temp_Int + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_Int Greater than or equal to 2
        • Then - Actions
          • Set Temp_Int = 0
          • Set Temp_Point = (Center of Reward <gen>)
          • Item - Create Claws of Attack +15 at Temp_Point
          • Custom script: call RemoveLocation( udg_Temp_Point )
        • Else - Actions
  • Leave
    • Events
      • Unit - A unit leaves One <gen>
      • Unit - A unit leaves Two <gen>
    • Conditions
    • Actions
      • Set Temp_Unit = (Triggering unit)
      • Set Temp_Player = (Owner of Temp_Unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • Temp_Player Equal to Player 1 (Red)
              • Temp_Player Equal to Player 2 (Blue)
        • Then - Actions
          • Set UnitInRegion[(Player number of Temp_Player)] = False
        • Else - Actions
 

Attachments

  • TestDialogv2.w3x
    11 KB · Views: 47

Celalith

C

Celalith

Actually, I would have wanted to show the message to the owner of the units, not to players 1 and 2, because when in Multiplayer, maybe teal will enter the region, and thus not see the message. Instead player 2 aka blue will see it.
 

Celalith

C

Celalith

Any type to text like the one you wrote - item - and show it to the owner of the units, not players 1 and 2.
 

Celalith

C

Celalith

In the map you made for me, showing the triggers, you showed the message to player 1 and 2, correct?
Well I want to use this dialog for multiplayer. Multiplayer has more then 2 players.
So I want to change the triggers, so It won't show the message to every player, but specific players.
So my question is, how to show the message to the owner of the units, not to every player.

Let's say me and 3 of my friends are playing a map and we use this dialog.
When I enter the region "One" and my friend enters the region "Two", then show the message of the dialog to the players, who's units are in the region. So not everyone sees the message.

Don't blame me if you don't understand.
English isn't my mother language.
 

Celalith

C

Celalith

How do I show a dialog to a player group?
I know that I can show a game text message to a player group but not a dialog.
 
u should create the dialogs with the yes and no options at 0.00 elapsed. then when unit enters region just show the dialog to the player. u will never need to clear dialog.
dont use this dialog for another trigger. The yes and no will not stack since ur only creating it once.
i have 7 dialogs in my map with a total of 49 buttons. they never collide or stack.
 
Status
Not open for further replies.
Top