- Joined
- Aug 12, 2008
- Messages
- 350
It's my first spell using hashtable that going to a spell in my spellpack and below are the triggers for the spell that I've made. It works perfectly fine with only a single caster but somehow it face a problem when two or more caster used it on the same time; not MUI.
Spell descriptionActive Ability
Spell Type : Instant/No Target
Tygore Powerhoof gets pump up with a charge mystical power at the axe that he hold. When Tygore attack a unit, the mystical will be release which it heals all nearby ally and damages all nearby enemies. Max up to 8 charges.
Level 1 : 50 heal; 75 damage
Level 2 : 100 heal; 150 damage
Level 3 : 150 heal; 225 damage
-
Charge Up setup
-
Events
- Map initialization
- Conditions
-
Actions
- Hashtable - Create a hashtable
- Set CU_hashtable = (Last created hashtable)
-
Events
-
Charge Up cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Charge Up
-
Actions
- Set CU_caster = (Triggering unit)
- Set CU_key = (Custom value of CU_caster)
- Hashtable - Save Handle OfCU_caster as 0 of CU_key in CU_hashtable
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load 1 of CU_key from CU_hashtable) Equal to False
-
Then - Actions
- Hashtable - Save True as 1 of CU_key in CU_hashtable
- Unit - Add Charge Up_attachment to CU_caster
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load 2 of CU_key from CU_hashtable) Less than 8
-
Then - Actions
- Set CU_charges = ((Load 2 of CU_key from CU_hashtable) + 1)
- Hashtable - Save CU_charges as 2 of CU_key in CU_hashtable
- Floating Text - Create floating text that reads |cffffcc00+1|r above CU_caster with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Set CU_floattext[CU_key] = (Last created floating text)
- Floating Text - Change CU_floattext[CU_key]: Disable permanence
- Floating Text - Set the velocity of CU_floattext[CU_key] to 64.00 towards 90.00 degrees
- Floating Text - Change the lifespan of CU_floattext[CU_key] to 2.00 seconds
- Floating Text - Change the fading age of CU_floattext[CU_key] to 0.75 seconds
- Floating Text - Destroy CU_floattext[CU_key]
-
Else - Actions
- Floating Text - Create floating text that reads |cffff0000+0|r above CU_caster with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Set CU_floattext[CU_key] = (Last created floating text)
- Floating Text - Change CU_floattext[CU_key]: Disable permanence
- Floating Text - Set the velocity of CU_floattext[CU_key] to 64.00 towards 90.00 degrees
- Floating Text - Change the lifespan of CU_floattext[CU_key] to 2.00 seconds
- Floating Text - Change the fading age of CU_floattext[CU_key] to 0.75 seconds
- Floating Text - Destroy CU_floattext[CU_key]
-
If - Conditions
- Hashtable - Save (50.00 x (Real((Level of Charge Up for CU_caster)))) as 3 of CU_key in CU_hashtable
- Hashtable - Save (75.00 x (Real((Level of Charge Up for CU_caster)))) as 4 of CU_key in CU_hashtable
- Hashtable - Save Abilities\Spells\Items\AIma\AImaTarget.mdl as 5 of CU_key in CU_hashtable
- Hashtable - Save Abilities\Spells\Items\AIil\AIilTarget.mdl as 6 of CU_key in CU_hashtable
-
Events
-
Charge Up release
-
Events
- Unit - A unit Is attacked
-
Conditions
- (Attacking unit) Equal to (Load 0 of (Custom value of (Attacking unit)) in CU_hashtable)
- (Load 1 of (Custom value of (Attacking unit)) from CU_hashtable) Equal to True
-
Actions
- Set CU_attacker = (Attacking unit)
- Set CU_target = (Triggering unit)
- Set CU_targetpoint = (Position of CU_target)
- Set CU_charge_current = (Load 2 of (Custom value of CU_attacker) from CU_hashtable)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 400.00 of CU_targetpoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) an and do (Actions)
-
Loop - Actions
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (Load 3 of (Custom value of CU_attacker) from CU_hashtable))
- Set CU_random_heal_point = (Position of (Picked unit))
- Special Effect - Create a special effect at CU_random_heal_point using (Load 5 of (Custom value of CU_attacker) from CU_hashtable)
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 400.00 of CU_targetpoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) an and do (Actions)
-
Loop - Actions
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - (Load 4 of (Custom value of CU_attacker) from CU_hashtable))
- Set CU_random_damage_point = (Position of (Picked unit))
- Special Effect - Create a special effect at CU_random_damage_point using (Load 6 of (Custom value of CU_attacker) from CU_hashtable)
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
- Set CU_charge_current = (CU_charge_current - 1)
- Hashtable - Save CU_charge_current as 2 of (Custom value of CU_attacker) in CU_hashtable
- Floating Text - Create floating text that reads |cffffcc00-1|r above CU_caster with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Set CU_floattext[CU_key] = (Last created floating text)
- Floating Text - Change CU_floattext[CU_key]: Disable permanence
- Floating Text - Set the velocity of CU_floattext[CU_key] to 64.00 towards 90.00 degrees
- Floating Text - Change the lifespan of CU_floattext[CU_key] to 2.00 seconds
- Floating Text - Change the fading age of CU_floattext[CU_key] to 0.75 seconds
- Floating Text - Destroy CU_floattext[CU_key]
- Custom script: call RemoveLocation (udg_CU_random_heal_point)
- Custom script: call RemoveLocation (udg_CU_random_damage_point)
- Custom script: call RemoveLocation (udg_CU_targetpoint)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Load 2 of (Custom value of CU_attacker) from CU_hashtable) Equal to 0
-
Then - Actions
- Unit - Remove Charge Up_attachment from CU_attacker
- Hashtable - Save False as 2 of (Custom value of CU_attacker) in CU_hashtable
- Hashtable - Clear all child hashtables of child (Custom value of CU_attacker) in CU_hashtable
- Else - Actions
-
If - Conditions
-
Events