• 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.

1 Hero limit

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Melee Initialization
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
    • Actions
      • Player - Limit training of Heroes to 0 for (Owner of (Sold unit))
This trigger can be used if your Heroes are obtained through buying it via Tavern/etc (imitates DotA Buy Hero System)
 
Level 16
Joined
May 2, 2011
Messages
1,351
This is how I did it in my map

  • ArmyLimit
    • Events
  • Map initialization
    • Conditions
    • Actions
      • -------- Humans --------
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • -------- Human Units --------
          • Player - Limit training of Heroes to 1 for (Player((Integer A)))
      • -------- and the trigger continues --------
If you are a bit confused with this function, you can find it in GUI this way:
  1. choose the action "For Each interger A from 1 to 12"
  2. choose in the loop "Player - Limit number of training heroes" then limit the number to zero
  3. In the player selection, choose from the function menu the following function function(i.e. not preset nor variable)>> Conversion - Convert Player index to player
  4. Again choose a function inside this called: "Integer A"
  5. Make sure that all the custom heroes you made are considered hereoes in the game play constants you can find it in the following menu:
    Advanced >> gameplay constants >> Scroll down to Techtree - Dependacy Equivlants - Hero.
Thanks To Garfield who told me this Before!!
 
Status
Not open for further replies.
Top