ok so, i trying to limit building of specific Unit/Building, i read around to get it to monitor a trigger, i know how to limit one, but want to limit the entire set of buildings so max of 7 total of any building, so 3 sentry, 2 turretbase, 2 gun tower, then u cant upgrade unit ro build another as limit is 7 over all
i have set up the trigger it works, however if limit reached it kills the unit that building and that is putting limit down
so if u limit to 7, and build 6 units after it lets u have 10 units, as it -1 to integer when it cancels the unit
i have set up the trigger it works, however if limit reached it kills the unit that building and that is putting limit down
so if u limit to 7, and build 6 units after it lets u have 10 units, as it -1 to integer when it cancels the unit
-
TurretLimiter
-

Events
-


Unit - A unit Begins construction
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Or - Any (Conditions) are true
-





Conditions
-






(Triggering unit) Equal to SetHeroGS[(Player number of (Owner of (Triggering unit)))]
-






(Unit-type of (Triggering unit)) Equal to Turret Base
-






(Unit-type of (Triggering unit)) Equal to Helix Laser Sentry
-






(Unit-type of (Triggering unit)) Equal to Laser Sentry
-






(Unit-type of (Triggering unit)) Equal to Rocket Sentry
-






(Unit-type of (Triggering unit)) Equal to Sentry Gun
-






(Unit-type of (Triggering unit)) Equal to Sentry Gun II
-






(Unit-type of (Triggering unit)) Equal to |cffd45e19Undead|r Sentry
-






(Unit-type of (Triggering unit)) Equal to Adaptive Sentry
-






(Unit-type of (Triggering unit)) Equal to |cff00ff00Undead|r Experimental Tower
-






(Unit-type of (Triggering unit)) Equal to |cff00ff00Undead|r Fire Laser
-






(Unit-type of (Triggering unit)) Equal to |cff00ff00Undead|r Poison Laser
-






(Unit-type of (Triggering unit)) Equal to |cff00ff00Undead|r Shock Laser
-






(Unit-type of (Triggering unit)) Equal to |cff00ff00Undead|r Radar Tower
-






(Unit-type of (Triggering unit)) Equal to |cff00ff00Undead|r Turret Base
-






(Unit-type of (Triggering unit)) Equal to |cff00ff00Undead|r Vulcan
-






(Unit-type of (Triggering unit)) Equal to |cffd45e19Undead|r Turret
-






(Unit-type of (Triggering unit)) Equal to |cffd45e19Undead|r Blast Tower
-






(Unit-type of (Triggering unit)) Equal to |cffd45e19Undead|r Monument
-
-
-
-



Then - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






TurretLimitInterger[(Player number of (Owner of (Triggering unit)))] Greater than or equal to 7
-
-





Then - Actions
-






Set VariableSet CancelUnit = (Triggering unit)
-






Countdown Timer - Start CancelTimer as a One-shot timer that will expire in 0.00 seconds
-






Game - Display to (Player group((Owner of (Triggering unit)))) the text: [|cffff0000U|rD|cff...
-
-





Else - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








TurretLimitInterger[(Player number of (Owner of (Triggering unit)))] Less than 7
-
-







Then - Actions
-








Set VariableSet TurretLimitInterger[(Player number of (Owner of (Triggering unit)))] = (TurretLimitInterger[(Player number of (Owner of (Triggering unit)))] + 1)
-
-







Else - Actions
-
-
-
-
-



Else - Actions
-
-
-
-
TurretLimitReducer
-

Events
-


Unit - A unit Dies
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Or - Any (Conditions) are true
-





Conditions
-






(Unit-type of (Dying unit)) Equal to Turret Base
-






(Unit-type of (Dying unit)) Equal to Helix Laser Sentry
-






(Unit-type of (Dying unit)) Equal to Laser Sentry
-






(Unit-type of (Dying unit)) Equal to Rocket Sentry
-






(Unit-type of (Dying unit)) Equal to Sentry Gun
-






(Unit-type of (Dying unit)) Equal to Sentry Gun II
-






(Unit-type of (Dying unit)) Equal to |cffd45e19Undead|r Sentry
-






(Unit-type of (Dying unit)) Equal to Adaptive Sentry
-






(Unit-type of (Dying unit)) Equal to |cff00ff00Undead|r Experimental Tower
-






(Unit-type of (Dying unit)) Equal to |cff00ff00Undead|r Fire Laser
-






(Unit-type of (Dying unit)) Equal to |cff00ff00Undead|r Poison Laser
-






(Unit-type of (Dying unit)) Equal to |cff00ff00Undead|r Shock Laser
-






(Unit-type of (Dying unit)) Equal to |cff00ff00Undead|r Radar Tower
-






(Unit-type of (Dying unit)) Equal to |cff00ff00Undead|r Turret Base
-






(Unit-type of (Dying unit)) Equal to |cff00ff00Undead|r Vulcan
-






(Unit-type of (Dying unit)) Equal to |cffd45e19Undead|r Turret
-






(Unit-type of (Dying unit)) Equal to |cffd45e19Undead|r Blast Tower
-






(Unit-type of (Dying unit)) Equal to |cffd45e19Undead|r Monument
-
-
-
-



Then - Actions
-




Set VariableSet TurretLimitInterger[(Player number of (Owner of (Triggering unit)))] = (TurretLimitInterger[(Player number of (Owner of (Triggering unit)))] - 1)
-
-



Else - Actions
-
-
-
-
CancelTrigger
-

Events
-


Time - CancelTimer expires
-
-

Conditions
-

Actions
-


Custom script: call IssueImmediateOrderById(udg_CancelUnit, 851976)
-
-

