• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

GUI Race selection system

Status
Not open for further replies.
Level 7
Joined
Jan 11, 2022
Messages
108
Sorry for such question but damn me I can't find such thread (although some time ago I found one and now it seems like it's gone)
Is there a GUI selection system for custom races? I can't find one (I need one in GUI, not Jass/vJass

Also another smaller question. I have a new custom race with a townhall. Will setting it in Game Constants make countdown ordering player to build a townhall not appear?
 
Hi here is what i did on my map
  • Ice Monster Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set Ice_Monsters = (Picked player)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Race of Ice_Monsters) Equal to Orc) and ((Ice_Monsters handicap) Equal to 90.00)
            • Then - Actions
              • Player - Set Ice_Monsters handicap to 100.00%
              • Sound - Play y2mate_com___Gothic_2_Soundtrack___Khorinis__HQ__EEXbryHbMwU <gen>
              • Unit Group - Pick every unit in (Units owned by Ice_Monsters of type Peon) and do (Actions)
                • Loop - Actions
                  • Unit - Create 1 |cff0042ffWorker|r for Ice_Monsters at (Position of (Picked unit)) facing Default building facing degrees
                  • Unit - Remove (Picked unit) from the game
              • Unit Group - Pick every unit in (Units owned by Ice_Monsters of type Great Hall) and do (Actions)
                • Loop - Actions
                  • Unit - Create 1 |cff0042ffFrost Town Hall|r for Ice_Monsters at (Position of (Picked unit)) facing Default building facing degrees
                  • Unit - Remove (Picked unit) from the game
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Ice_Monsters controller) Equal to Computer
                • Then - Actions
                  • AI - Start campaign AI script for Ice_Monsters: war3mapImported\IceMonsterAi15.ai
                  • Player - Add 150 to (Picked player) Current gold
                • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Race of Ice_Monsters) Equal to Orc) and ((Ice_Monsters handicap) Less than 90.00)
                  • ((Race of Ice_Monsters) Equal to Orc) and ((Ice_Monsters handicap) Greater than 90.00)
            • Then - Actions
              • AI - Start campaign AI script for Ice_Monsters: war3mapImported\orc.ai
            • Else - Actions
  • Move Base
    • Events
      • Time - Elapsed game time is 0.50 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Unit-type of (Picked unit)) Equal to Town Hall
                      • (Unit-type of (Picked unit)) Equal to Great Hall
                      • (Unit-type of (Picked unit)) Equal to Necropolis
                      • (Unit-type of (Picked unit)) Equal to Tree of Life
                      • (Unit-type of (Picked unit)) Equal to |cff0042ffFrost Town Hall|r
                      • (Unit-type of (Picked unit)) Equal to Mercenary Camp
                      • (Unit-type of (Picked unit)) Equal to Harbor Hall
                      • (Unit-type of (Picked unit)) Equal to Frozen Hall
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Region 001 <gen> contains (Picked unit)) Equal to True
                    • Then - Actions
                      • Unit - Move (Picked unit) instantly to (Center of Region 000 <gen>)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Region 003 <gen> contains (Picked unit)) Equal to True
                    • Then - Actions
                      • Unit - Move (Picked unit) instantly to (Center of Region 002 <gen>)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Region 005 <gen> contains (Picked unit)) Equal to True
                    • Then - Actions
                      • Unit - Move (Picked unit) instantly to (Center of Region 004 <gen>)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Region 007 <gen> contains (Picked unit)) Equal to True
                    • Then - Actions
                      • Unit - Move (Picked unit) instantly to (Center of Region 006 <gen>)
                    • Else - Actions
                • Else - Actions
As for the townhall problem you need to go to "Advanced"-"Gameplay Constants"-and search "Techtree - Dependency Equivalents -Tier 1,2,3 Hall" and there you must add your new townhall
 
Level 7
Joined
Jan 11, 2022
Messages
108
Will that make for example Orc race unplayable? Because it will automatically change orc town hall and workers to new grace's equivalents

Is there a way to make that selection to make all 4 standard races playable AND a new race?
 
Will that make for example Orc race unplayable? Because it will automatically change orc town hall and workers to new grace's equivalents

Is there a way to make that selection to make all 4 standard races playable AND a new race?
that trigger will let you have the normal race and the custom one, you will be able to play as ice monster if you select orc and 90% handicap, else orc and 100% handicap will be the normal orc race
 
Level 7
Joined
Jan 11, 2022
Messages
108
Umm what does the handicap exactly do? Never heard bout it. Was it like the thing that decreased hit points of player's units?
 
Level 7
Joined
Jan 11, 2022
Messages
108
I'd be glad to hear out about this, since I don't know what these regions exactly do and where to put them (I only suppose that they should all be at starting locations)
 
Level 7
Joined
Jan 11, 2022
Messages
108
I managed to get it to work using your handicap trigger (still don't know what is the second trigger doing) but even after setting new Town Halls in gameplay constants it starts the countdown to reveal the player.
is interfering with defeat/victory initialization trigger the only way to get it to work?
 
  • Wait For Trigger
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Trigger - Turn on Victory and Defeat <gen>
  • Victory and Defeat
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A structure) Equal to True
    • Actions
      • Set PlayerNum[0] = 0
      • For each (Integer PlayerNum[0]) from 0 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (PlayerColour[PlayerNum[0]] slot status) Equal to Is playing
            • Then - Actions
              • Set PlayerNum[1] = 0
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                • Then - Actions
                  • For each (Integer PlayerNum[1]) from 0 to 7, do (Actions)
                    • Loop - Actions
                      • Set PlayerStructure[0] = True
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (PlayerColour[PlayerNum[1]] slot status) Equal to Is playing
                          • (PlayerColour[PlayerNum[1]] is an ally of PlayerColour[PlayerNum[0]]) Equal to False
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • PlayerStructure[0] Equal to True
                            • Then - Actions
                              • Set PlayerNum[2] = 0
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (PlayerColour[PlayerNum[2]] slot status) Equal to Is playing
                                • Then - Actions
                                  • Set PlayerStructure[0] = True
                                  • For each (Integer PlayerNum[2]) from 0 to 7, do (Actions)
                                    • Loop - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (PlayerColour[PlayerNum[2]] is an enemy of PlayerColour[PlayerNum[0]]) Equal to True
                                        • Then - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • PlayerStructure[0] Equal to True
                                              • (Count structures controlled by PlayerColour[PlayerNum[2]] (Include incomplete structures)) Equal to 0
                                            • Then - Actions
                                              • Do nothing
                                              • Set PlayerStructure[0] = True
                                            • Else - Actions
                                              • Set PlayerStructure[0] = False
                                        • Else - Actions
                                          • Do nothing
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Count structures controlled by PlayerColour[PlayerNum[0]] (Include incomplete structures)) Equal to 0
                                    • Then - Actions
                                      • Game - Defeat PlayerColour[PlayerNum[0]] with the message: Defeat!
                                    • Else - Actions
                                      • Do nothing
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • PlayerStructure[0] Equal to True
                                    • Then - Actions
                                      • Game - Victory PlayerColour[PlayerNum[0]] (Show dialogs, Show scores)
                                    • Else - Actions
                                      • Do nothing
                                • Else - Actions
                                  • Do nothing
                              • If (PlayerStructure[0] Equal to True) then do (Game - Victory PlayerColour[PlayerNum[3]] (Show dialogs, Show scores)) else do (Do nothing)
                            • Else - Actions
                        • Else - Actions
                          • Do nothing
                • Else - Actions
                  • Do nothing
            • Else - Actions
              • Do nothing
 
Status
Not open for further replies.
Top