I'm trying to create a Buying Abilities System. Unique for each hero, but I don't know how. Please, help me. :S
Triggers :
Triggers :
-
learnability
-

Events
-


Unit - A unit Acquires an item
-
-

Conditions
-


(Item-class of (Item being manipulated)) Equal to Powerup
-
-

Actions
-


Set TempUnit = (Triggering unit)
-


Set TempItem = (Item being manipulated)
-


For each (Integer A) from 0 to ItemAbilityCount, do (Actions)
-



Loop - Actions
-




Set TempInt = (Integer A)
-




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





If - Conditions
-






Items[TempInt] Equal to (Item-type of TempItem)
-
-





Then - Actions
-






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







If - Conditions
-








(Level of Abilities[TempInt] for TempUnit) Less than 1
-
-







Then - Actions
-








Unit - Add Abilities[TempInt] to TempUnit
-








Set TempForce = (Player group((Owner of TempUnit)))
-








Game - Display to TempForce the text: Parabéns, você ap...
-








Item - Remove TempItem
-








Custom script: call DestroyForce( udg_TempForce )
-








Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\Items\Alam\AlemTarget.mdl
-








Special Effect - Destroy (Last created special effect)
-








Custom script: exitwhen true
-
-







Else - Actions
-
-
-





Else - Actions
-
-




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





If - Conditions
-






Level[TempInt] Greater than 1
-
-





Then - Actions
-






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







If - Conditions
-








(Level of Abilities[TempInt] for TempUnit) Less than Level[TempInt]
-
-







Then - Actions
-








Unit - Increase level of Abilities[TempInt] for TempUnit
-








Set TempForce = (Player group((Owner of TempUnit)))
-








Game - Display to TempForce for 5.00 seconds the text: Você acaba de evol...
-








Item - Remove TempItem
-








Custom script: call DestroyForce( udg_TempForce )
-








Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\Items\Alam\AlemTarget.mdl
-








Special Effect - Destroy (Last created special effect)
-








Custom script: exitwhen true
-
-







Else - Actions
-








Set TempForce = (Player group((Owner of TempUnit)))
-








Game - Display to TempForce for 5.00 seconds the text: Esta habilidade já...
-








Item - Remove TempItem
-








Custom script: call DestroyForce( udg_TempForce )
-








Player - Add Lumber[(Integer A)] to (Owner of TempUnit) Current lumber
-
-
-






Skip remaining actions
-
-





Else - Actions
-






Set TempForce = (Player group((Owner of TempUnit)))
-






Game - Display to TempForce for 5.00 seconds the text: Esta habilidade já...
-






Item - Remove TempItem
-






Custom script: call DestroyForce(udg_TempForce )
-






Player - Add Lumber[TempInt] to (Owner of TempUnit) Current lumber
-
-
-
-
-
-
-
setvariables1
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Set ItemAbilityCount = -1
-


-------- SpellPunch! --------
-


Set ItemAbilityCount = (ItemAbilityCount + 1)
-


Set Abilities[ItemAbilityCount] = Punch!
-


Set Items[ItemAbilityCount] = Punch!
-


Set Lumber[ItemAbilityCount] = 1
-


Set Level[ItemAbilityCount] = 10
-


-------- --------
-
-






