• 🏆 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!

[Solved] For selecting alternate race ?

I have the idea of a mod-map where there are the mainline stock factions and my own altered take on them, playable along each other side by side. The map would have a trigger setup so that you can pit vanilla humans versus custom humans, etc.
How i would like to imagine it would functions:
At game begin would get a simple dialogue box asking which version of your chosen at lobby faction you would like to play, with only two buttons clickable: Vanilla or Altered, which then replaces your starting units accordingly.
Since i havent really done like this before, besides copy pasting already made code would like to ask on how that can be done ?
 
Level 11
Joined
Nov 13, 2010
Messages
212
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Run melee AI scripts (for computer players)
      • Melee Game - Use melee time of day (for all players)
      • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
      • Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
      • Melee Game - Set starting resources (for all players)
      • Melee Game - Remove creeps and critters from used start locations (for all players)
      • Set VariableSet PlayerColour[0] = Player 1 (Red)
      • Set VariableSet PlayerColour[1] = Player 2 (Blue)

  • Dialog Box Races
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Dialog - Create a dialog button for DialogBox[0] labelled |cff80ff80Vanilla|r
      • Set VariableSet DialogButtons[0] = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogBox[0] labelled |cff80ff80Altered|r
      • Set VariableSet DialogButtons[1] = (Last created dialog Button)

  • Player Intialization
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Wait 5.00 seconds
      • For each (Integer PlayerNum[4]) from 0 to 2, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (PlayerColour[PlayerNum[4]] controller) Equal to User
            • Then - Actions
              • Dialog - Show DialogBox[0] for PlayerColour[PlayerNum[4]]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (PlayerColour[PlayerNum[4]] controller) Equal to Computer
                • Then - Actions
                  • Melee Game - Create (Race of PlayerColour[PlayerNum[4]]) starting units for PlayerColour[PlayerNum[4]] at (PlayerColour[PlayerNum[4]] start location) (Include Heroes)
                  • If ((Race of PlayerColour[PlayerNum[4]]) Equal to Human) then do (Unit - Create 1 Paladin for PlayerColour[PlayerNum[4]] at (PlayerColour[PlayerNum[4]] start location) facing Default building facing degrees) else do (Do nothing)
                  • If ((Race of PlayerColour[PlayerNum[4]]) Equal to Night Elf) then do (Unit - Create 1 Priestess of the Moon for PlayerColour[PlayerNum[4]] at (PlayerColour[PlayerNum[4]] start location) facing Default building facing degrees) else do (Do nothing)
                  • If ((Race of PlayerColour[PlayerNum[4]]) Equal to Undead) then do (Unit - Create 1 Dreadlord for PlayerColour[PlayerNum[4]] at (PlayerColour[PlayerNum[4]] start location) facing Default building facing degrees) else do (Do nothing)
                  • If ((Race of PlayerColour[PlayerNum[4]]) Equal to Orc) then do (Unit - Create 1 Tauren Chieftain for PlayerColour[PlayerNum[4]] at (PlayerColour[PlayerNum[4]] start location) facing Default building facing degrees) else do (Do nothing)
                  • If ((Player 1 (Red) controller) Equal to Computer) then do (Player - Set name of Player 1 (Red) to set a name) else do (Do nothing)
                  • If ((Player 2 (Blue) controller) Equal to Computer) then do (Player - Set name of Player 2 (Blue) to set a name) else do (Do nothing)
                • Else - Actions
                  • Do nothing

  • Dialog Button Press
    • Events
      • Dialog - A dialog button is clicked for DialogBox[0]
    • Conditions
    • Actions
      • -------- Vanilla --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButtons[0]
        • Then - Actions
          • Unit - Create 1 Town Hall for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
          • Unit - Create 5 Peasant for (Triggering player) at (Center of (Region centered at ((Triggering player) start location) with size (0.00, 7.00))) facing ((Triggering player) start location)
        • Else - Actions
          • Do nothing
      • -------- Altered --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButtons[1]
        • Then - Actions
          • Unit - Create 1 Great Hall for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
          • Unit - Create 5 Peon for (Triggering player) at (Center of (Region centered at ((Triggering player) start location) with size (0.00, 7.00))) facing ((Triggering player) start location)
        • Else - Actions
          • Do nothing

you can ofc add more Races to this if you like
 
Level 11
Joined
Nov 13, 2010
Messages
212
well it depends on what kind of map you are making.

if it is just a melee map you can use this and set in Melee Initialization
  • Melee Game - Enforce victory/defeat conditions (for all players)
if it is more complex than you have to make your own win and lose event !
 
Top