On a map I am making, you buy your abilities for your heros.
I suck at JASS, so am struggling to do this with GUI.
I have it set up so that if a unit buys an item, depending on what item that is, the unit will get the ability. This is not a problem, it works fine (thanks to ParrotHead for the template). Example:
I would like it so that the hero truly has it, has to level, and learn it.
I have absolutely NO idea how to do this :/
Here are some of my attempts:
I suck at JASS, so am struggling to do this with GUI.
I have it set up so that if a unit buys an item, depending on what item that is, the unit will get the ability. This is not a problem, it works fine (thanks to ParrotHead for the template). Example:
-
Events
-
Unit - A unit manipulates an item
-
-
Conditions
-
(Item-type of (Item being manipulated)) Equal to Unholy Aura
-
-
Actions
-
Set skill[(Player number of (Triggering player))] = Unholy Aura
-
Wait 0.20 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of skill[(Player number of (Triggering player))] for (Triggering unit)) Less than 1
-
-
Then - Actions
-
Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: (You have bought the skill + (Name of (Item being manipulated)))
-
Hero - Learn skill for heroes[(Player number of (Triggering player))]: Unholy Aura
-
-
Else - Actions
-
Game - Display to (Player group((Triggering player))) for 5.00 seconds the text: (You already have + ((Name of (Item being manipulated)) + .))
-
Player - Add 1 to (Triggering player) Current gold
-
-
-
I would like it so that the hero truly has it, has to level, and learn it.
I have absolutely NO idea how to do this :/
Here are some of my attempts:
-
Events
-
Unit - A unit Acquires an item
-
-
Conditions
-
(Item-type of (Item being manipulated)) Equal to Unholy Aura
-
-
Actions
-
Set skill[(Player number of (Triggering player))] = Unholy Aura
-
Wait 0.20 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of skill[(Player number of (Triggering player))] for (Triggering unit)) Less than 1
-
-
Then - Actions
-
Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: (You have bought the skill + (Name of (Item being manipulated)))
-
Hero - Learn skill for heroes[(Player number of (Triggering player))]: Unholy Aura
-
-
Else - Actions
-
Game - Display to (Player group((Triggering player))) for 5.00 seconds the text: (You already have + ((Name of (Item being manipulated)) + .))
-
Player - Add 1 to (Triggering player) Current gold
-
-
-
Last edited: