- Joined
- Oct 10, 2013
- Messages
- 173
Please guy's do not steal the spell i gonna repair the leak then upload it
here
here
-
Kamehameha Init
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Kamehameha
-
-

Actions
-


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



If - Conditions
-




(KH_UnitGroup is empty) Equal to True
-
-



Then - Actions
-




Trigger - Turn on Kamehameha Loop <gen>
-
-



Else - Actions
-
-


-------- Preset Variables --------
-


Set KH_Caster = (Triggering unit)
-


Set KH_Intelligence = (Intelligence of KH_Caster (Exclude bonuses))
-


Set KH_TargetUnit = (Target unit of ability being cast)
-


-------- Hashtable Saves --------
-


Hashtable - Save Handle OfKH_Caster as 0 of (Key (Triggering unit)) in KH_Hashtable
-


Hashtable - Save KH_Intelligence as 1 of (Key (Triggering unit)) in KH_Hashtable
-


Hashtable - Save Handle OfKH_TargetUnit as 2 of (Key (Triggering unit)) in KH_Hashtable
-


Hashtable - Save (2.00 x (Real(KH_Intelligence))) as 3 of (Key (Triggering unit)) in KH_Hashtable
-


Hashtable - Save Handle OfKH_DummyGroup as 4 of (Key (Triggering unit)) in KH_Hashtable
-


Hashtable - Save 0.00 as 6 of (Key (Triggering unit)) in KH_Hashtable
-


-------- Now run proper actions --------
-


Unit Group - Add KH_Caster to KH_UnitGroup
-


-------- Special effects --------
-


-------- for hashtable, save effects from 15-25 --------
-


Special Effect - Create a special effect attached to the hand right of KH_Caster using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
-


Hashtable - Save Handle Of(Last created special effect) as 15 of (Key (Triggering unit)) in KH_Hashtable
-


-------- Create Main Unit --------
-


Set KH_temppoint = (Position of KH_Caster)
-


Set KH_tempreal = (Angle from KH_temppoint to KH_TargetPoint)
-


Set KH_temppoint2 = (KH_temppoint offset by 20.00 towards KH_tempreal degrees)
-


Unit - Create 1 KH_Head for (Owner of KH_Caster) at KH_temppoint2 facing Default building facing degrees
-


Hashtable - Save Handle Of(Last created unit) as 5 of (Key (Triggering unit)) in KH_Hashtable
-


-------- Remove Leaks --------
-


Custom script: call RemoveLocation(udg_KH_temppoint)
-


Custom script: call RemoveLocation(udg_KH_temppoint2)
-
-
-
Kamehameha Loop
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in KH_UnitGroup and do (Actions)
-



Loop - Actions
-




Set KH_tempunit = (Picked unit)
-




Set KH_TargetPoint = (Position of (Load 2 of (Key (Picked unit)) in KH_Hashtable))
-




Set KH_Damage = (Load 3 of (Key (Picked unit)) from KH_Hashtable)
-




Set KH_DummyGroup = (Load 4 of (Key (Picked unit)) in KH_Hashtable)
-




Set KH_DummyUnit = (Load 5 of (Key (Picked unit)) in KH_Hashtable)
-




Set KH_temppoint3 = (Position of KH_DummyUnit)
-




Set KH_tempreal4 = (Angle from KH_temppoint3 to KH_TargetPoint)
-




Set KH_temppoint4 = (KH_temppoint3 offset by 25.00 towards KH_tempreal4 degrees)
-




Set KH_tempreal2 = (Distance between KH_temppoint3 and KH_TargetPoint)
-




Hashtable - Save ((Load 6 of (Key (Picked unit)) from KH_Hashtable) + 0.03) as 6 of (Key (Picked unit)) in KH_Hashtable
-




Unit - Move KH_DummyUnit instantly to KH_temppoint4
-




Custom script: call RemoveLocation(udg_KH_temppoint4)
-




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





If - Conditions
-






(Load 6 of (Key (Picked unit)) from KH_Hashtable) Less than 1.50
-






KH_tempreal2 Greater than 10.00
-
-





Then - Actions
-






-------- Create Trails --------
-






Unit - Create 1 KH_Trail for (Owner of KH_tempunit) at KH_temppoint3 facing Default building facing degrees
-






Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-






Unit Group - Add (Last created unit) to KH_DummyGroup
-






Hashtable - Save Handle OfKH_DummyGroup as 4 of (Key (Picked unit)) in KH_Hashtable
-






Set KH_tempgroup = (Units within 50.00 of KH_temppoint3 matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and (((Matching unit) belongs to an enemy of (Owner of KH_tempunit)) Equal to True))))
-






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







If - Conditions
-








(Number of units in KH_tempgroup) Greater than 0
-
-







Then - Actions
-








-------- Damage all units --------
-








Unit - Create 1 KH_Explosion for (Owner of KH_tempunit) at KH_temppoint3 facing Default building facing degrees
-








Custom script: set bj_wantDestroyGroup = true
-








Unit Group - Pick every unit in (Units within 250.00 of KH_temppoint3 matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and (((Matching unit) belongs to an enemy of (Owner of KH_tempunit)) Equal to True)))) and do (Actions)
-









Loop - Actions
-










Unit - Cause KH_tempunit to damage (Picked unit), dealing KH_Damage damage of attack type Chaos and damage type Force
-
-
-








Custom script: call RemoveLocation(udg_KH_temppoint3)
-








Unit Group - Pick every unit in KH_DummyGroup and do (Actions)
-









Loop - Actions
-










Set KH_timer = (KH_timer + 0.05)
-










Unit - Add a (((Real((Number of units in KH_DummyGroup))) / (Real((Number of units in KH_DummyGroup)))) + KH_timer) second Generic expiration timer to (Picked unit)
-
-
-








Unit - Remove KH_DummyUnit from the game
-








Special Effect - Destroy (Load 15 of (Key (Picked unit)) in KH_Hashtable)
-








Hashtable - Clear all child hashtables of child (Key (Picked unit)) in KH_Hashtable
-








Unit Group - Remove KH_tempunit from KH_UnitGroup
-
-







Else - Actions
-
-






Custom script: call DestroyGroup(udg_KH_tempgroup)
-
-





Else - Actions
-






-------- Damage all units --------
-






Unit - Create 1 KH_Explosion for (Owner of KH_tempunit) at KH_temppoint3 facing Default building facing degrees
-






Custom script: set bj_wantDestroyGroup = true
-






Unit Group - Pick every unit in (Units within 250.00 of KH_temppoint3 matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and (((Matching unit) belongs to an enemy of (Owner of KH_tempunit)) Equal to True)))) and do (Actions)
-







Loop - Actions
-








Unit - Cause KH_tempunit to damage (Picked unit), dealing KH_Damage damage of attack type Chaos and damage type Force
-
-
-






Custom script: call RemoveLocation(udg_KH_temppoint3)
-






Unit Group - Pick every unit in KH_DummyGroup and do (Actions)
-







Loop - Actions
-








Set KH_timer = (KH_timer + 0.05)
-








Unit - Add a (((Real((Number of units in KH_DummyGroup))) / (Real((Number of units in KH_DummyGroup)))) + KH_timer) second Generic expiration timer to (Picked unit)
-
-
-






Unit - Remove KH_DummyUnit from the game
-






Special Effect - Destroy (Load 15 of (Key (Picked unit)) in KH_Hashtable)
-






Hashtable - Clear all child hashtables of child (Key (Picked unit)) in KH_Hashtable
-






Unit Group - Remove KH_tempunit from KH_UnitGroup
-
-
-
-
-


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



If - Conditions
-




(KH_UnitGroup is empty) Equal to True
-
-



Then - Actions
-




Trigger - Turn off (This trigger)
-
-



Else - Actions
-
-
-
