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

[Solved] Singular unit-type

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,898
  • Disable
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Gryphon Rider
    • Actions
      • Player - Limit training of Gryphon Rider to 0 for (Owner of (Triggering unit))
  • Enable
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Gryphon Rider
    • Actions
      • Player - Limit training of Gryphon Rider to 1 for (Owner of (Triggering unit))
I believe this setup might have an exploit by allowing the Player to queue up several Gryphon Riders and bypass the Limit in doing so.

If that's the case, you can change the Event in the Disable trigger to: A unit Begins training a unit, instead of Finishes.

You would then create a new Enable trigger that uses the Event: A unit Cancels training a unit.

The new trigger would look something like this:
A unit Cancels training a unit -> Unit-type = Gryphon Rider -> Limit training to 1

Obviously replace Gryphon Rider with your Storm Wyrm.
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,898
Begins training doesn't respond to "trained unit" and "triggering unit" references.
Right, you want to use Trained Unit-Type instead. See my picture.
 

Attachments

  • example.png
    example.png
    206.4 KB · Views: 39
Level 19
Joined
Jan 1, 2018
Messages
741
  • Disable
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Gryphon Rider
    • Actions
      • Player - Limit training of Gryphon Rider to 0 for (Owner of (Triggering unit))
  • Enable
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Gryphon Rider
    • Actions
      • Player - Limit training of Gryphon Rider to 1 for (Owner of (Triggering unit))
Why not just limit training to 1 at map init?
 
Level 19
Joined
Jan 1, 2018
Messages
741
That can be bypassed by training more than 1 at once.
Just tested (on 1.31 PTR if it matters), the limit takes units being trained into account, so if you don't have the unit type, but you're training one, you cannot add more units to the training queue.
 
Status
Not open for further replies.
Top