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

Training Limit

Status
Not open for further replies.
Level 8
Joined
Aug 13, 2018
Messages
338
I want something that allow you to have only one of two(or more) units at a time.
And when it dies, allow you to train one of them again.
I did used "Dependency Equivalents" and training limit but it's one way and if I set "Dependency Equivalents" for both of them, it result crash.
How can I do this?
Just think you can have one general at a time, and there are different general classes.
 
Level 8
Joined
Aug 13, 2018
Messages
338
It is an action in the trigger editor under players I believe. 2 sec. Checking

Edit:
Here you go.

  • base.gif
    Untitled Trigger 001
    • joinminus.gif
      events.gif
      Events
      • line.gif
        joinbottom.gif
        folder.gif
        Map initialization
    • join.gif
      cond.gif
      Conditions
    • joinbottomminus.gif
      actions.gif
      Actions
      • empty.gif
        joinbottom.gif
        player.gif
        Player - Limit training of Footman to 1 for Player 1 (Red)
No, I want to set something that alow you have one of two generals at a time.
 
If they are heroes you can probably use.
  • Player - Limit training of Heroes to 1 for Player 1 (Red)
Otherwise, you would have to trigger it, something like.

Trigger 1
  • Trained
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Trained unit)) Equal to Footman
          • (Unit-type of (Trained unit)) Equal to Rifleman
    • Actions
      • Player - Make Footman Unavailable for training/construction by (Owner of (Triggering unit))
      • Player - Make Rifleman Unavailable for training/construction by (Owner of (Triggering unit))
Trigger 2
  • Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Footman
          • (Unit-type of (Triggering unit)) Equal to Rifleman
    • Actions
      • Player - Make Footman Available for training/construction by (Owner of (Triggering unit))
      • Player - Make Rifleman Available for training/construction by (Owner of (Triggering unit))
Alternatively, if you want to be more usefriendly. You can use a dummy unit as requirement, and removing it when the unit is trained. Calling it something like 'Only 1 General per player'
 
Status
Not open for further replies.
Top