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

Help Begining Decide

Status
Not open for further replies.
Level 13
Joined
Nov 22, 2006
Messages
1,260
You can use dialogs in this case. This example will display a dialog with title "Choose your team" and it will have two buttons, "Team 1" and "Team 2":

  • Dialog Display
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Dialog - Change the title of YourDialog to Choose your team
      • Dialog - Create a dialog button for YourDialog labelled Team 1
      • Set DialogButton1 = (Last created dialog Button)
      • Dialog - Create a dialog button for YourDialog labelled Team 2
      • Set DialogButton2 = (Last created dialog Button)
      • Dialog - Show YourDialog for (Some player) (Red)

Instead of that Some player you put the player you want the dialog to be displayed to (can be more players, you just need to CnP).

This trigger will do whatever actions you need to do to put someone in a certain team, just replace Do something with whatever you need to:

  • Dialog Actions
    • Events
      • Dialog - A dialog button is clicked for YourDialog
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButton1
        • Then - Actions
          • Do something
        • Else - Actions
          • Do something

For this you would have to create 3 variables:
  1. Dialog variable named YourDialog
  2. Dialog button variable named DialogButton1
  3. Dialog button variable named DialogButton2
You can name the variables whatever you want, I'm just saying what variable names my example uses.

This would, of course, be only if there were two teams, you can put however you want, it's all up to you.
 
Status
Not open for further replies.
Top