• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[General] Limit training of unit-type!

Status
Not open for further replies.
Level 11
Joined
Jun 2, 2004
Messages
849
It acts as a max to the number of units the player can own at once. If the unit dies, or is removed, then the player will be able to train another. From your unit name I presume the unit isn't sticking around.

You can have a trigger detect when a unit of that type is trained and then limit the number to 0, preventing the player from training more.
 
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Player - Limit training of (Unit-type of (Sold unit)) to 0 for (Picked player)
Ok, so now I use this and still not working. The unit is not removed from the game, and when I buy it I can still buy another one!
The selling unit is neutral
 
Level 4
Joined
Jul 26, 2016
Messages
88
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Player - Limit training of (Unit-type of (Sold unit)) to 0 for (Picked player)
Ok, so now I use this and still not working. The unit is not removed from the game, and when I buy it I can still buy another one!
The selling unit is neutral

Pretty sure thats because Units Trained by player does not apply to Units Sold in neutral shop. Pretty much only works if they're trained by training/building from player's barracks/builders. Not even sure if it applies to units sold by the player's own units.
 
Status
Not open for further replies.
Top