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

Race Choosing at Beginning of Map?

Status
Not open for further replies.
Level 2
Joined
Jun 20, 2004
Messages
10
How do I make a screen that pops up in the begininning of a map so the player can choose his/her race? Like in Zoator TD, you get to choose between 5 races, and get a tower builder according to which race you chose.

Can someone help?

Thanks,
-Sniper-
 
Level 13
Joined
Jan 9, 2004
Messages
1,037
You would have to make a dialog box system. First, make a dialog variable to store the main box. I'll refer to it as DialogBox. Then make a dialog button variable for every button of the box. So, if you had to choose from Human, Orc, Undead, or Night Elf you would make a DialogBTN_Human, DialogBTN_Orc, DialogBTN_Undead, and DialogBTN_NightElf. Now you would make the following triggers:
Code:
Events
--Time - Elapsed game time is 2.00 seconds
Conditions
Actions
--Dialog - Change the title of DialogBox to What race would you like to be?
--Dialog - Create a dialog button for DialogBox labelled Human
--Set DialogBTN_Human = (Last created dialog Button)
--Dialog - Create a dialog button for DialogBox labelled Orc
--Set DialogBTN_Orc = (Last created dialog Button)
--Dialog - Create a dialog button for DialogBox labelled Undead
--Set DialogBTN_Undead = (Last created dialog Button)
--Dialog - Create a dialog button for DialogBox labelled Night Elf
--Set DialogBTN_NightElf = (Last created dialog Button)
--Dialog - Show DialogBox for Player 1 (Red)

Code:
Events
--Dialog - A dialog button is clicked for DialogBox
Conditions
Actions
--If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Clicked dialog button) Equal to DialogBTN_Human
    Then - Actions
        Trigger - Run [Human Setup Trigger] (checking conditions)
    Else - Actions
        Do nothing
--If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Clicked dialog button) Equal to DialogBTN_Orc
    Then - Actions
        Trigger - Run tirgger <gen> (checking conditions)
    Else - Actions
        Do nothing
--If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Clicked dialog button) Equal to DialogBTN_Undead
    Then - Actions
        Trigger - Run [Undead Setup Trigger] (checking conditions)
    Else - Actions
        Do nothing
--If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Clicked dialog button) Equal to DialogBTN_NightElf
    Then - Actions
        Trigger - Run [NightElf Setup Trigger] (checking conditions)
    Else - Actions
        Do nothing
 
Status
Not open for further replies.
Top