• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help with unit training limit trigger!

Status
Not open for further replies.
Level 3
Joined
Dec 20, 2008
Messages
41
Hi to everyone! i have another problem. This time it's about limits of certain units. I want to set limits for every unit type. And to increase it with some upgrade (let's call it OrcLimitIncrease).

So for example
i want to set the limit of Grunts to 5 for picked player.
then if level of OrcLimitIncrease is 1 fir picked player
set limit of training of grunt to 10
if the level is 2
then the limit is 15
etc etc etc

any help would be appreciated!
 
Level 20
Joined
Oct 21, 2006
Messages
3,231
  • Limit Grunts
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Berserker Strength
    • Actions
      • Player - Limit training of Grunt to (5 x (Current research level of Berserker Strength for (Owner of (Triggering unit)))) for (Owner of (Triggering unit))
Something like this.
 
Level 9
Joined
Dec 12, 2007
Messages
489
WoW thanks alot! but i think with this triggers it'll set the limit to 0 by default. o_O

what do you mean "set the limit to 0 by default"? you can edit it.
like from:
  • Player - Limit training of Grunt to (5 x (Current research level of Berserker Strength for (Owner of (Triggering unit)))) for (Owner of (Triggering unit))
to:
  • Player - Limit training of Grunt to ( 5 + (5 x (Current research level of Berserker Strength for (Owner of (Triggering unit))))) for (Owner of (Triggering unit))
and for initial value part, in a trigger that runs at map initialization, do:
  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set PGroup = (All players matching (((Matching player) slot status) Equal to Is playing))
      • Player Group - Pick every player in PGroup and do (Actions)
        • Loop - Actions
          • Player - Limit training of Grunt to 5 for (Picked player)
      • Custom script: call DestroyForce(udg_PGroup)
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
Hi to everyone! i have another problem. This time it's about limits of certain units. I want to set limits for every unit type. And to increase it with some upgrade (let's call it OrcLimitIncrease).

So for example
i want to set the limit of Grunts to 5 for picked player.
then if level of OrcLimitIncrease is 1 fir picked player
set limit of training of grunt to 10
if the level is 2
then the limit is 15
etc etc etc

any help would be appreciated!

You can do this with food...for example if a grunt=5 food,you can allow a player to have only 25 food this means he will have only 5 grunts.~Just an idea.
 
Status
Not open for further replies.
Top