Help plz

Beaves36

New Member
Reaction score
0
Ok so i took a regular playing map and i want to be able to add new races without over riding the old ones. How do i do it? and make it an option that can be picked like you normally do before a game starts? I looked under tech tree properties but it does give any new options for the race i created. Help plz
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
as far as i know, without being some mad wc modder, in which case it would only take effect on your own computer, you cant make additional races available to be picked before a game starts :/

my suggestion is making the players choose a race when the game starts with a dialog :thup: then you could have as many as you want.
 

Beaves36

New Member
Reaction score
0
dang because i wanted to keep it basically the same because me and my friends just like to play simple games but we need more variety. Using same shit over and over is boring hahaha. Because if i use a option in the beginning the computer wouldnt pick id had to randomize it all and thatd be gah... i hate gui code. Could it be possible to get one of the new races if the person picked random like how u can random a secret hero in footmen?
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
oh yeah, very easily =p its literally a thing that acts just like this conversation:

atkthis: alright guys, pick a number 1-10

Harry: 7!! 7!!!@ GAAAH I PICK 7!!
atkthis: >.> jesus. fine 7, that was orcs
Pete: 5.
atkthis: that was the raging homo's >.>

etc.

you have it give each player a random number :] and according to that number, you get a race.

edit:
here, im going to bed, but tell you what. do your races and things, and ill do those triggers for you :] k? wouldn't take me very long, and you guys would get to have fun, which in the end, is all a mapper does what they do, for ... if that made any sense :p just send me a private message with the map or a link or something, and what exactly it is you want to be done, and ill send it back completed :]
 

aussj4link

New Member
Reaction score
3
This is actually pretty simple, I did it in a couple of my maps actually.

Trigger:
  • Ini Options
    • Events
      • Time - Elapsed game time is 0.05 seconds
    • Conditions
    • Actions
      • Dialog - Change the title of Diag_1 to Choose Your Style
      • Dialog - Create a dialog button for Diag_1 labelled Hero War
      • Set Diag_Hero = (Last created dialog Button)
      • Dialog - Create a dialog button for Diag_1 labelled Melee
      • Set Diag_Melee = (Last created dialog Button)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) controller) Equal to User
        • Then - Actions
          • Dialog - Show Diag_1 for Player 1 (Red)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 2 (Blue) controller) Equal to User
        • Then - Actions
          • Dialog - Show Diag_1 for Player 2 (Blue)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 3 (Teal) controller) Equal to User
        • Then - Actions
          • Dialog - Show Diag_1 for Player 3 (Teal)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 4 (Purple) controller) Equal to User
        • Then - Actions
          • Dialog - Show Diag_1 for Player 4 (Purple)
        • Else - Actions
          • Do nothing




Trigger:
  • Race Pick Buttons Red
    • Events
      • Dialog - A dialog button is clicked for RacePick_Red
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Human_Red
        • Then - Actions
          • Dialog - Hide RacePick_Red for (Triggering player)
          • Melee Game - Create Human starting units for (Triggering player) at ((Triggering player) start location) (Include Heroes)
          • Player - Set (Triggering player) Current gold to 450
          • Player - Set (Triggering player) Current lumber to 175
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Orc_Red
        • Then - Actions
          • Dialog - Hide RacePick_Red for (Triggering player)
          • Melee Game - Create Orc starting units for Player 1 (Red) at (Player 1 (Red) start location) (Include Heroes)
          • Player - Set Player 1 (Red) Current gold to 450
          • Player - Set Player 1 (Red) Current lumber to 175
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to NightElf_Red
        • Then - Actions
          • Dialog - Hide RacePick_Red for (Triggering player)
          • Melee Game - Create Night Elf starting units for Player 1 (Red) at (Player 1 (Red) start location) (Include Heroes)
          • Player - Set Player 1 (Red) Current gold to 700
          • Player - Set Player 1 (Red) Current lumber to 350
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Undead_Red
        • Then - Actions
          • Dialog - Hide RacePick_Red for (Triggering player)
          • Melee Game - Create Undead starting units for Player 1 (Red) at (Player 1 (Red) start location) (Include Heroes)
          • Player - Set Player 1 (Red) Current gold to 1600
          • Player - Set Player 1 (Red) Current lumber to 500
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Demon_Red
        • Then - Actions
          • Dialog - Hide RacePick_Red for (Triggering player)
          • Melee Game - Create Demon starting units for Player 1 (Red) at (Player 1 (Red) start location) (Include Heroes)
          • Player - Set Player 1 (Red) Current gold to 800
          • Player - Set Player 1 (Red) Current lumber to 500
        • Else - Actions



You can change whatever you need here, starting units, players, pretty much anything. Also I used a specific player on everything but you can change it all to (Triggering Player) to make the triggers a lot simpler.
Also as an Initialization probably will need:

Trigger:
  • Ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Remove creeps and critters from used start locations (for all players)


This way it will get rid of creeps if you have them on your map. Hope this helps let me know if anything is not clear. :D
 

Beaves36

New Member
Reaction score
0
just wondering if that would random any custom type races or if thatd just random the 4 classes
 

Sui-cookie

You can change this now in User CP.
Reaction score
49
thats not a random system, its a pick your race system. combine what he sied and what i sied in that other post :thup: then you can have a choice as to weather you random, or pick
 

aussj4link

New Member
Reaction score
3
Ok I made a bran new map to test everything out, this should do what you want:

Trigger:
  • Dialog Ini
    • Events
      • Time - Elapsed game time is 0.05 seconds
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Equal to User
            • Then - Actions
              • Dialog - Change the title of Race_Pick to Choose your Race
              • Dialog - Create a dialog button for Race_Pick labelled Human
              • Set Human_Button = (Last created dialog Button)
              • Dialog - Create a dialog button for Race_Pick labelled Orc
              • Set Orc_Button = (Last created dialog Button)
              • Dialog - Create a dialog button for Race_Pick labelled Night Elf
              • Set NightElf_Button = (Last created dialog Button)
              • Dialog - Create a dialog button for Race_Pick labelled Undead
              • Set Undead_Button = (Last created dialog Button)
              • Dialog - Create a dialog button for Race_Pick labelled Random
              • Set Random_Button = (Last created dialog Button)
              • Dialog - Show Race_Pick for (Picked player)
            • Else - Actions


This will create a dialog for all user controlled players, including a random button.

Trigger:
  • Race Pick
    • Events
      • Dialog - A dialog button is clicked for Race_Pick
    • Conditions
    • Actions
      • Melee Game - Set starting resources (for all players)
      • Melee Game - Remove creeps and critters from used start locations (for all players)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Human_Button
        • Then - Actions
          • Melee Game - Create Human starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Orc_Button
        • Then - Actions
          • Melee Game - Create Orc starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to NightElf_Button
        • Then - Actions
          • Melee Game - Create Night Elf starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Undead_Button
        • Then - Actions
          • Melee Game - Create Undead starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Random_Button
        • Then - Actions
          • Set Random_Int = (Random integer number between 1 and 4)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random_Int Equal to 1
            • Then - Actions
              • Melee Game - Create Human starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random_Int Equal to 2
            • Then - Actions
              • Melee Game - Create Orc starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random_Int Equal to 3
            • Then - Actions
              • Melee Game - Create Night Elf starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random_Int Equal to 4
            • Then - Actions
              • Melee Game - Create Undead starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)
            • Else - Actions
        • Else - Actions


This will enable the buttons on your dialog to work, including the random button which uses a random Integer Variable to decide which race is chosen. If you want a chance that if you chose random you can get kind of a secret race just add another:

Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)


And change the integer value to 5, also make sure you change:

Trigger:
  • Set Random_Int = (Random integer number between 1 and 4)


to:

Trigger:
  • Set Random_Int = (Random integer number between 1 and 5)


and place you custom starting Building(s) and Unit(s) in place of

Trigger:
  • Melee Game - Create starting units for (Triggering player) at ((Triggering player) start location) (Exclude Heroes)


Trigger:
  • Comp Ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Remove creeps and critters from used start locations (for all players)
      • Melee Game - Set starting resources (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)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) controller) Equal to Computer
            • Then - Actions
              • Melee Game - Create (Race of (Picked player)) starting units for (Picked player) at ((Picked player) start location) (Include Heroes)
            • Else - Actions
      • Melee Game - Run melee AI scripts (for computer players)


This will run the computer for you, you can choose which race the comp will be or random from the map selection screen. Again let me know if you need any help. Sorry I didn't realize you wanted a random system before, so I made one here, hope it helps.


Conclusion:

This will use 1 Integer Variable which is used for the randomize for the races. It will also need Dialog Button Variables for all your races, here I have used 4 of them for the default races any more will require a Dialog Button Variable if you plan to use it for your Dialog, if you just want it to be a chance in the random you wont need it. Essentially its 3 triggers, one for your dialog, 1 for the dialog buttons to work, and one so the computer will do its thang.
 

Attachments

  • Triggers!.w3x
    29 KB · Views: 129
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top