• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Help with unit training limit trigger!

Status
Not open for further replies.
Level 3
Joined
Dec 20, 2008
Messages
42
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!
 
  • 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.
 
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)
 
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.
Back
Top