Building Limit Trigger

Status
Not open for further replies.

ndh

ndh

Level 8
Joined
Apr 21, 2012
Messages
343
Yeah it seems really simple, but for some reason i can't get it. What i am trying to do is limit the amount of structures you can have of a certain type. This is usually pretty easy i know, but the problem is, the structure that i want a limit on upgrades several times. So how do i make it so that no matter what upgrade the building is at, you can only have, say, 10 of that structure.
 
Use math my friend :)... I'll give you an example:

What you need:

Integer_A ([Integer]Make it)
Group_A ([UnitGroup]Make it)

-Say you want 5 maximum soldiers.

Soldiers = Axeman OR Swordman OR Stabber

Set Group_A = units of type Axeman OR Swordman OR Stabber (All your soldiers)

Set Integer_A = number of units in Group_A

Set maximum units to 5 - Integer_A

Execute the trigger every 0.03 sec! There ya go :)
 
  • Like
Reactions: ndh
Use math my friend :)... I'll give you an example:

What you need:

Integer_A ([Integer]Make it)
Group_A ([UnitGroup]Make it)

-Say you want 5 maximum soldiers.

Soldiers = Axeman OR Swordman OR Stabber

Set Group_A = units of type Axeman OR Swordman OR Stabber (All your soldiers)

Set Integer_A = number of units in Group_A

Set maximum units to 5 - Integer_A

Execute the trigger every 0.03 sec! There ya go :)

Thanks! +rep
 
Status
Not open for further replies.
Back
Top