HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Charge Gold/Lumber + Requirement bug?

02-02-2009, 06:28 PM#1
Chocobo
I have a problem on giving/removing a requirement to Charge Gold and Lumber.

I have 1 upgrade called "Counter +1" that costs 3g and has the requirement to have the dummy unit "Upgrade - Counter Maxed" alive (the dummy unit is created at map init).

Trigger:
Collapse For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
Collapse .................
Unit - Create 1 Upgrade - Counter Maxed for Player[(Integer A)] at TempPoints[0] facing Default building facing (270.0) degrees
Set UpgradeCounter[(Integer A)] = (Last created unit)

Player is an player array variable with values Player 1~12 on indexes 1~12.


The Charge Gold and Lumber is used by a unit called "Upgrade".

Trigger:
Collapse Upgrade Counter
Events
Collapse [events are added through another trigger]
Collapse Conditions
(Ability being cast) Equal to Upgrade - Counter +1 [All]
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Hero[(Player number of (Owner of (Triggering unit)))] is alive) Equal to True
Collapse Then - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Upgrade - Counter Bonus for Hero[(Player number of (Owner of (Triggering unit)))]) Equal to 0
Collapse Then - Actions
Unit - Add Upgrade - Counter Bonus to Hero[(Player number of (Owner of (Triggering unit)))]
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Upgrade - Counter Bonus for Hero[(Player number of (Owner of (Triggering unit)))]) Equal to 99
Collapse Then - Actions
Unit - Remove UpgradeCounter[(Player number of (Owner of (Triggering unit)))] from the game
Else - Actions
Unit - Increase level of Upgrade - Counter Bonus for Hero[(Player number of (Owner of (Triggering unit)))]
Else - Actions

The spell is supposed to be only usable 100 times (having Counter Bonus at Lv100), then it removes the dummy unit however the ability Charge Gold and Lumber stills usable.

How to remove the requirement for Charge Gold and Lumber so it is not castable anymore after a certain point using a dummy unit requirement?