• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

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