-
Lightning Link
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Lightning Link
-
Actions
- Set VariableSet LL_Index = (LL_Index + 1)
- Unit Group - Add LL_Caster to LL_CastGroup
- Set VariableSet LL_Caster = (Triggering unit)
- Hashtable - Save Handle OfLL_Caster as 0 of (Key (Triggering unit).) in LL_Hash.
- Set VariableSet LL_Loc1 = (Position of LL_Caster)
- Hashtable - Save Handle OfLL_Loc1 as 1 of (Key (Triggering unit).) in LL_Hash.
- Set VariableSet LL_Time = 100.00
- Hashtable - Save LL_Time as 2 of (Key (Triggering unit).) in LL_Hash.
- Set VariableSet LL_Damage = (Real((Level of Lightning Link for LL_Caster)))
- Hashtable - Save LL_Damage as 3 of (Key (Triggering unit).) in LL_Hash.
- Set VariableSet LL_UG = (Units within 625.00 of LL_Loc1 matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of LL_Caster).) Equal to True)).)
-
Unit Group - Pick every unit in LL_UG and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is A structure) Equal to False
- ((Picked unit) is Mechanical) Equal to False
- ((Picked unit) is Magic Immune) Equal to False
- ((Picked unit) is dead) Equal to False
-
Then - Actions
- Hashtable - Save Handle OfLL_UG as 4 of (Key (Triggering unit).) in LL_Hash.
- Set VariableSet LL_Target = (Picked unit)
- Hashtable - Save Handle OfLL_Target as 5 of (Key (Triggering unit).) in LL_Hash.
- Set VariableSet LL_Loc2 = (Position of LL_Target)
- Hashtable - Save Handle OfLL_Loc2 as 6 of (Key (Triggering unit).) in LL_Hash.
- Custom script: set udg_LL_Lightning = AddLightningEx("FORK", true , GetLocationX(udg_LL_Loc1), GetLocationY(udg_LL_Loc1), GetLocationZ(udg_LL_Loc1) + 70, GetLocationX(udg_LL_Loc2), GetLocationY(udg_LL_Loc2), GetLocationZ(udg_LL_Loc2) + 70)
- Set VariableSet LL_Lightning = (Last created lightning effect)
- Set VariableSet LL_Distance = (Distance between LL_Loc1 and LL_Loc2)
- Hashtable - Save LL_Distance as 8 of (Key (Triggering unit).) in LL_Hash.
- Hashtable - Save Handle OfLL_Lightning as 7 of (Key (Triggering unit).) in LL_Hash.
- Lightning - Change color of LL_Lightning to (0.75 0.75 0.00) with 0.66 alpha
- Custom script: call DestroyLightning (udg_LL_Lightning)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- LL_Index Equal to 1
-
Then - Actions
- Trigger - Turn on LL Loop <gen>
- Else - Actions
-
If - Conditions
-
Events
-
LL Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in LL_CastGroup and do (Actions)
-
Loop - Actions
- Set VariableSet LL_Time = (Load 2 of (Key (Picked unit).) from LL_Hash.)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- LL_Time Greater than 0.00
-
Then - Actions
- Hashtable - Save (LL_Time - 1.00) as 2 of (Key (Picked unit).) in LL_Hash.
- Set VariableSet LL_Caster = (Load 0 of (Key (Picked unit).) in LL_Hash.)
- Set VariableSet LL_Target = (Load 5 of (Key (Picked unit).) in LL_Hash.)
- Set VariableSet LL_UG = (Load 4 of (Key (Picked unit).) in LL_Hash.)
- Set VariableSet LL_Loc1 = (Load 1 of (Key (Picked unit).) in LL_Hash.)
- Set VariableSet LL_Loc2 = (Load 6 of (Key (Picked unit).) in LL_Hash.)
- Set VariableSet LL_Distance = (Load 8 of (Key (Picked unit).) from LL_Hash.)
- Set VariableSet LL_Damage = (Load 3 of (Key (Picked unit).) from LL_Hash.)
- Set VariableSet LL_Lightning = (Load 7 of (Key (Picked unit).) in LL_Hash.)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- LL_Distance Greater than 625.00
-
Then - Actions
- Unit Group - Remove LL_Target from LL_UG.
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (LL_Caster is dead) Equal to True
-
Then - Actions
- Set VariableSet LL_Index = (LL_Index - 1)
- Custom script: call DestroyLightning (udg_LL_Lightning)
- Custom script: call DestroyGroup (udg_LL_UG)
- Custom script: call RemoveLocation (udg_LL_Loc2)
- Custom script: call RemoveLocation (udg_LL_Loc1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (LL_Target is dead) Equal to True
-
Then - Actions
- Unit Group - Remove LL_Target from LL_UG.
- Game - Display to (All players) the text: (String((Number of units in LL_UG)))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in LL_UG) Equal to 0
-
Then - Actions
- Set VariableSet LL_Index = (LL_Index - 1)
- Custom script: call DestroyGroup (udg_LL_UG)
- Custom script: call DestroyLightning (udg_LL_Lightning)
- Custom script: call RemoveLocation (udg_LL_Loc1)
- Custom script: call RemoveLocation (udg_LL_Loc2)
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in LL_UG and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is A structure) Equal to False
- ((Picked unit) is Mechanical) Equal to False
- ((Picked unit) is Magic Immune) Equal to False
- ((Picked unit) is dead) Equal to False
-
Then - Actions
- Set VariableSet LL_Loc1 = (Position of LL_Caster)
- Set VariableSet LL_Target = (Picked unit)
- Set VariableSet LL_Loc2 = (Position of LL_Target)
- Unit - Cause LL_Caster to damage LL_Target, dealing LL_Damage damage of attack type Spells and damage type Magic
- Custom script: set udg_LL_Lightning = AddLightningEx("FORK", true , GetLocationX(udg_LL_Loc1), GetLocationY(udg_LL_Loc1), GetLocationZ(udg_LL_Loc1) + 70, GetLocationX(udg_LL_Loc2), GetLocationY(udg_LL_Loc2), GetLocationZ(udg_LL_Loc2) + 70)
- Set VariableSet LL_Lightning = (Last created lightning effect)
- Lightning - Change color of LL_Lightning to (0.75 0.75 0.00) with 0.66 alpha
- Custom script: call MoveLightningEx(udg_LL_Lightning , true, GetLocationX(udg_LL_Loc1), GetLocationY(udg_LL_Loc1), GetLocationZ(udg_LL_Loc1) + 70, GetLocationX(udg_LL_Loc2), GetLocationY(udg_LL_Loc2), GetLocationZ(udg_LL_Loc2) + 70)
- Set VariableSet LL_Distance = (Distance between LL_Loc1 and LL_Loc2)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Else - Actions
- Custom script: call DestroyGroup (udg_LL_UG)
- Custom script: call RemoveLocation (udg_LL_Loc1)
- Custom script: call RemoveLocation (udg_LL_Loc2)
- Custom script: call DestroyLightning (udg_LL_Lightning)
- Set VariableSet LL_Index = (LL_Index - 1)
-
If - Conditions
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- LL_Index Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in LL_CastGroup and do (Actions)
-
Events
I'm just gonna put my whole map here since it's in the very early days of progress.