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

Faction Selection for a Wc2 Melee

Status
Not open for further replies.
Level 4
Joined
Dec 26, 2015
Messages
65
Hello Hive,

I am working on a melee map that will use wc2 factions (not just Orc and Humans, but the actually kingdoms and clans).

I require a trigger system that will allow the player to select their nation or clan simply by using the assigned team color at the map start ie playing as human (red) will start you off with Stromgarde forces instead of the standard.

I need it to work for human and orcs and may expand to other races in future. PS I am adding melee AI, so i would like this to work when someone is selecting computer players.
 
Level 5
Joined
Mar 30, 2006
Messages
60
You can simply use handicaps.

Detect them during loading screen and apply Main hall upgrades to your factions or replace the starting units.

  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Set TempPlayer = (Picked player)
      • Set tempPlayerN = (Player number of TempPlayer)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Race of TempPlayer) Equal to Orc
          • (TempPlayer handicap) Equal to 90.00
        • Then - Actions
          • Set PlayerRaceType[tempPlayerN] = Fel Orcs
          • Player Group - Add TempPlayer to FelOrcPlayers
          • Player - Set TempPlayer handicap to 100.00%
          • Unit Group - Pick every unit in (Units owned by TempPlayer of type Great Hall) and do (Actions)
            • Loop - Actions
              • Set TempUnit = (Picked unit)
              • Unit - Order TempUnit to train/upgrade to a Hellfire Outpost
              • Unit - Set TempUnit upgrade progress to 100%
          • Unit Group - Pick every unit in (Units owned by TempPlayer of type Peon (start)) and do (Actions)
            • Loop - Actions
              • Unit - Replace (Picked unit) with a Peon Slave using The old unit's relative life and mana
        • Else - Actions
          • Set PlayerRaceType[tempPlayerN] = Orcs
          • Player - Make Hellfire Outpost Unavailable for training/construction by TempPlayer
 
Level 4
Joined
Dec 26, 2015
Messages
65
I would really like to be able to use Team color as its is an important element to the Lore and to the play ability I had envisioned.
 
Level 11
Joined
Jun 2, 2004
Messages
849
Well the concept with team color is similar. There's a Player Color Comparison specifically for checking the color of a player. Loop through all the players at the start, check their color, and set their units appropriately.
 
Level 4
Joined
Dec 26, 2015
Messages
65
Ok its been a while since I tried a looping selection as I am only moderately proficient in in GUI triggering 0 in Jass other than pasting. Do u have a example that i could try in a map? I have never seen this used so i have no basis for reference. ++ rep for sure.
 
Status
Not open for further replies.
Top