- Joined
- Aug 22, 2008
- Messages
- 911
Greetings Hive,
A problem, I have.
My spell is supposed to increase the max mana of the spell-owning unit after it kills an enemy unit. The effect increases with level (longer duration, more max mana). The dummy ability itself is passive.
The following three triggers were supposed to do the job, but for some reason it doesn't remove the ability after it gives it and there's no floating text.
Can someone please help me find what did I do wrong?
A problem, I have.
My spell is supposed to increase the max mana of the spell-owning unit after it kills an enemy unit. The effect increases with level (longer duration, more max mana). The dummy ability itself is passive.
The following three triggers were supposed to do the job, but for some reason it doesn't remove the ability after it gives it and there's no floating text.
Can someone please help me find what did I do wrong?
-
Init
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Hashtable - Create a hashtable
-
Set Hunger_Table = (Last created hashtable)
-
-
-
Kill
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
(Level of Vengeful Hunger for (Killing unit)) Greater than or equal to 1
-
-
Actions
-
Unit - Set mana of (Killing unit) to ((Mana of (Killing unit)) + (50.00 x (Real((Level of Vengeful Hunger for (Killing unit))))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Killing unit) is in Hunger_Group) Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Vengeful Hunger for (Killing unit)) Equal to 1
-
-
Then - Actions
-
Unit - Add Increase Mana (100) to (Killing unit)
-
Hashtable - Save 10 as 1 of (Key (Killing unit)) in Hunger_Table
-
Hashtable - Save Handle Of(Killing unit) as 0 of (Key (Killing unit)) in Hunger_Table
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Vengeful Hunger for (Killing unit)) Equal to 2
-
-
Then - Actions
-
Unit - Add Increase Mana (150) to (Killing unit)
-
Hashtable - Save 15 as 2 of (Key (Killing unit)) in Hunger_Table
-
Hashtable - Save Handle Of(Killing unit) as 0 of (Key (Killing unit)) in Hunger_Table
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Vengeful Hunger for (Killing unit)) Equal to 3
-
-
Then - Actions
-
Unit - Add Increase Mana (200) to (Killing unit)
-
Hashtable - Save 20 as 3 of (Key (Killing unit)) in Hunger_Table
-
Hashtable - Save Handle Of(Killing unit) as 0 of (Key (Killing unit)) in Hunger_Table
-
-
Else - Actions
-
-
Unit Group - Add (Killing unit) to Hunger_Group
-
-
Else - Actions
-
-
-
-
Interval
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in Hunger_Group and do (Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to 3, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Load (Integer A) of (Key (Picked unit)) from Hunger_Table) Equal to 0
-
-
Then - Actions
-
If ((Integer A) Equal to 1) then do (Unit - Remove Increase Mana (100) from (Picked unit)) else do (Do nothing)
-
If ((Integer A) Equal to 2) then do (Unit - Remove Increase Mana (150) from (Picked unit)) else do (Do nothing)
-
If ((Integer A) Equal to 3) then do (Unit - Remove Increase Mana (200) from (Picked unit)) else do (Do nothing)
-
Hashtable - Save -1 as (Integer A) of (Key (Picked unit)) in (Last created hashtable)
-
If (((Load 1 of (Key (Picked unit)) from Hunger_Table) Less than or equal to 0) and (((Load 2 of (Key (Picked unit)) from Hunger_Table) Less than or equal to 0) and ((Load 3 of (Key (Picked unit)) from Hunger_Table) Less than or equal to 0))) then do (Unit Group - Remove (Picked unit) from Hunger_Group) else do (Do nothing)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Load (Integer A) of (Key (Picked unit)) from Hunger_Table) Greater than or equal to 1
-
-
Then - Actions
-
Hashtable - Save ((Load (Integer A) of (Key (Picked unit)) from Hunger_Table) - 1) as (Integer A) of (Key (Picked unit)) in Hunger_Table
-
Floating Text - Create floating text that reads (Load (Integer A) of (Key (Picked unit)) from Hunger_Table) above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-
-
Else - Actions
-
-
-
-
-
-
-