• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

this is an big problem

Rheiko

Spell Reviewer
Level 28
Joined
Aug 27, 2013
Messages
4,259
I believe you can do something like this with trigger editor. Open your trigger editor and create a new trigger, then create the rest as following:
  • Events
    • Unit - A unit Sells a unit
  • Conditions
    • ((Sold unit) is A Hero) Equal to True
  • Actions
    • Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Owner of (Sold unit))
This way, you can't have two units of the same hero.

You should also consider playing around with these fields in object editor:
'Techtree - Requirements'
'Techtree - Requirements - Tier 2'
'Techtree - Requirements - Tier 3'

and these fields in Gameplay Constants:
'Techtree - Dependancy Equivalents - Altar'
'Techtree - Dependancy Equivalents - Hero'
 
Last edited:
Level 18
Joined
Dec 20, 2012
Messages
269
Alternatively, you can do it like this.

  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Player - Limit training of Archimonde Warlock to 1 for (Picked player)
And update Techtree - Dependency Equivalents - Hero under Gameplay Constants.
 

Attachments

  • ScrGameplayConstants.png
    ScrGameplayConstants.png
    103.1 KB · Views: 7
  • ScrGameplayConstantsEditTechtreeDependencyEquivalentsHero.png
    ScrGameplayConstantsEditTechtreeDependencyEquivalentsHero.png
    30.7 KB · Views: 6
Top