ChainHookSlide
Events
Time - Every 0.03 seconds of game time
Conditions
(ChainHookDummyGroup is empty) Equal to False
Actions
Unit Group - Pick every unit in ChainHookDummyGroup and do (Actions)
Loop - Actions
Set TempInteger = (Custom value of (Picked unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MUITarget[TempInteger] Equal to No unit
Then - Actions
Set TempInteger2 = (((TempInteger x 100) - 100) + ChainHookDummyCount[TempInteger])
Set MUISlide[(Custom value of (Picked unit))] = (MUISlide[(Custom value of (Picked unit))] + 20.00)
Set TempPointArray[1] = (Position of MUICaster[TempInteger])
Set TempPointArray[2] = (Position of MUICaster[TempInteger])
Set TempPoint = (TempPointArray[1] offset by MUISlide[TempInteger] towards (Angle from TempPointArray[2] to MUIPoint[(Custom value of (Picked unit))]) degrees)
Custom script: call RemoveLocation (udg_TempPointArray[1])
Custom script: call RemoveLocation (udg_TempPointArray[2])
Set TempPointArray[1] = (Position of MUICaster[TempInteger])
Unit - Move (Picked unit) instantly to TempPoint, facing (Angle from TempPointArray[1] to MUIPoint[TempInteger]) degrees
Custom script: call RemoveLocation (udg_TempPoint)
Custom script: call RemoveLocation (udg_TempPointArray[1])
Set TempPoint = (Position of MUICaster[TempInteger])
Set TempPointArray[1] = (Position of ChainHookDummys[TempInteger2])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between TempPoint and TempPointArray[1]) Greater than or equal to 45.00
Then - Actions
Custom script: call RemoveLocation (udg_TempPoint)
Set TempPoint = (Position of MUICaster[TempInteger])
Set ChainHookDummyCount[TempInteger] = (ChainHookDummyCount[TempInteger] + 1)
Set TempInteger2 = (((TempInteger x 100) - 100) + ChainHookDummyCount[TempInteger])
Unit - Create 1 ChainHook for (Owner of MUICaster[TempInteger]) at TempPoint facing (Facing of ChainHookDummys[(TempInteger2 - 1)]) degrees
Set ChainHookDummys[TempInteger2] = (Last created unit)
Custom script: call RemoveLocation (udg_TempPoint)
Else - Actions
Custom script: call RemoveLocation (udg_TempPoint)
Custom script: call RemoveLocation (udg_TempPointArray[1])
For each (Integer A) from 2 to ChainHookDummyCount[TempInteger], do (Actions)
Loop - Actions
Set TempInteger2 = (((TempInteger x 100) - 100) + (Integer A))
Set TempPoint = ((Position of ChainHookDummys[(TempInteger2 - 1)]) offset by 40.00 towards (Angle from (Position of ChainHookDummys[(TempInteger2 - 1)]) to (Position of ChainHookDummys[TempInteger2])) degrees)
Set TempPointArray[1] = (Position of ChainHookDummys[TempInteger2])
Set TempPointArray[2] = (Position of ChainHookDummys[(TempInteger2 - 1)])
Unit - Move ChainHookDummys[TempInteger2] instantly to TempPoint, facing (Angle from TempPointArray[1] to TempPointArray[2]) degrees
Custom script: call RemoveLocation (udg_TempPoint)
Custom script: call RemoveLocation (udg_TempPointArray[1])
Custom script: call RemoveLocation (udg_TempPointArray[2])
Set TempGroup = (Units within 90.00 of (Position of (Picked unit)))
Unit Group - Pick every unit in TempGroup 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 alive) Equal to True
(Picked unit) Not equal to MUICaster[TempInteger]
Then - Actions
Set MUITarget[TempInteger] = (Picked unit)
Unit - Turn collision for MUITarget[TempInteger] Off
Else - Actions
Custom script: call DestroyGroup (udg_TempGroup)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MUISlide[(Custom value of (Picked unit))] Greater than or equal to 900.00
Then - Actions
Set MUITarget[TempInteger] = MUICaster[TempInteger]
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MUITarget[TempInteger] Equal to MUICaster[TempInteger]
Then - Actions
Set TempInteger2 = (((TempInteger x 100) - 100) + ChainHookDummyCount[TempInteger])
Set TempPoint = ((Position of ChainHookDummys[TempInteger2]) offset by 20.00 towards (Angle from (Position of ChainHookDummys[TempInteger2]) to (Position of MUICaster[TempInteger])) degrees)
Unit - Move ChainHookDummys[TempInteger2] instantly to TempPoint, facing (Angle from (Position of ChainHookDummys[(TempInteger2 + 1)]) to (Position of ChainHookDummys[TempInteger2])) degrees
Custom script: call RemoveLocation (udg_TempPoint)
For each (Integer A) from 1 to (ChainHookDummyCount[TempInteger] - 1), do (Actions)
Loop - Actions
Set TempInteger2 = (((TempInteger x 100) - 100) + (Integer A))
Set TempPoint = ((Position of ChainHookDummys[TempInteger2]) offset by 20.00 towards (Angle from (Position of ChainHookDummys[TempInteger2]) to (Position of ChainHookDummys[(TempInteger2 + 1)])) degrees)
Set TempPointArray[1] = (Position of ChainHookDummys[(TempInteger2 + 1)])
Set TempPointArray[2] = (Position of ChainHookDummys[TempInteger2])
Unit - Move ChainHookDummys[TempInteger2] instantly to TempPoint, facing (Angle from TempPointArray[1] to TempPointArray[2]) degrees
Custom script: call RemoveLocation (udg_TempPointArray[1])
Custom script: call RemoveLocation (udg_TempPointArray[2])
Custom script: call RemoveLocation (udg_TempPoint)
Set TempInteger2 = (((TempInteger x 100) - 100) + ChainHookDummyCount[TempInteger])
Set TempPoint = (Position of ChainHookDummys[TempInteger2])
Set TempPointArray[1] = (Position of MUICaster[TempInteger])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between TempPoint and TempPointArray[1]) Less than or equal to 10.00
Then - Actions
Set ChainHookDummyCount[TempInteger] = (ChainHookDummyCount[TempInteger] - 1)
Unit - Remove ChainHookDummys[TempInteger2] from the game
Else - Actions
Custom script: call RemoveLocation (udg_TempPoint)
Custom script: call RemoveLocation (udg_TempPointArray[1])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ChainHookDummyCount[TempInteger] Equal to 0
Then - Actions
Set MUISlide[TempInteger] = 0.00
Unit - Turn collision for MUITarget[TempInteger] On
Set MUITarget[TempInteger] = No unit
Set ChainHookDistance[TempInteger] = 0.00
Custom script: call RemoveLocation (udg_MUIPoint[udg_TempInteger])
Else - Actions
Else - Actions
Set TempInteger2 = (((TempInteger x 100) - 100) + ChainHookDummyCount[TempInteger])
Set TempPointArray[1] = (Position of MUICaster[TempInteger])
Set TempPointArray[2] = (Position of MUICaster[TempInteger])
Set TempPointArray[3] = (Position of ChainHookDummys[TempInteger2])
Set TempPoint = (TempPointArray[1] offset by 40.00 towards (Angle from TempPointArray[2] to TempPointArray[3]) degrees)
Custom script: call RemoveLocation (udg_TempPointArray[1])
Custom script: call RemoveLocation (udg_TempPointArray[2])
Custom script: call RemoveLocation (udg_TempPointArray[3])
Set TempPointArray[1] = (Position of MUICaster[TempInteger])
Set TempPointArray[2] = (Position of ChainHookDummys[TempInteger2])
Unit - Move ChainHookDummys[TempInteger2] instantly to TempPoint, facing (Angle from TempPointArray[1] to TempPointArray[2]) degrees
Custom script: call RemoveLocation (udg_TempPointArray[1])
Custom script: call RemoveLocation (udg_TempPointArray[2])
Custom script: call RemoveLocation (udg_TempPoint)
Set ChainHookDistance[TempInteger] = (ChainHookDistance[TempInteger] + 1.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(MUICaster[TempInteger] belongs to an enemy of (Owner of MUITarget[TempInteger])) Equal to True
Then - Actions
Set TempPoint = (Position of ChainHookDummys[((TempInteger x 100) - 99)])
Set TempPointArray[1] = (Position of MUITarget[TempInteger])
Unit - Cause MUICaster[TempInteger] to damage MUITarget[TempInteger], dealing ((Distance between TempPoint and TempPointArray[1]) / 2.00) damage of attack type Spells and damage type Normal
Custom script: call RemoveLocation (udg_TempPoint)
Custom script: call RemoveLocation (udg_TempPointArray[1])
Else - Actions
Set TempPoint = (Position of ChainHookDummys[((TempInteger x 100) - 99)])
Set TempPointArray[1] = (Position of MUITarget[TempInteger])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between TempPoint and TempPointArray[1]) Greater than or equal to 10.00
Then - Actions
Custom script: call RemoveLocation (udg_TempPoint)
Set TempInteger2 = ((TempInteger x 100) - 99)
Set TempPoint = (Position of ChainHookDummys[TempInteger2])
Unit - Move MUITarget[TempInteger] instantly to TempPoint
Custom script: call RemoveLocation (udg_TempPoint)
Set TempPoint = (Position of ChainHookDummys[TempInteger2])
Special Effect - Create a special effect at TempPoint using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
Custom script: call RemoveLocation (udg_TempPoint)
Special Effect - Destroy (Last created special effect)
Else - Actions
Custom script: call RemoveLocation (udg_TempPoint)
Custom script: call RemoveLocation (udg_TempPointArray[1])
For each (Integer A) from 1 to (ChainHookDummyCount[TempInteger] - 1), do (Actions)
Loop - Actions
Set TempInteger2 = (((TempInteger x 100) - 100) + (Integer A))
Set TempPointArray[1] = (Position of ChainHookDummys[(TempInteger2 + 1)])
Set TempPointArray[2] = (Position of ChainHookDummys[(TempInteger2 + 1)])
Set TempPointArray[3] = (Position of ChainHookDummys[TempInteger2])
Set TempPoint = (TempPointArray[1] offset by 40.00 towards (Angle from TempPointArray[2] to TempPointArray[3]) degrees)
Custom script: call RemoveLocation (udg_TempPointArray[1])
Custom script: call RemoveLocation (udg_TempPointArray[2])
Custom script: call RemoveLocation (udg_TempPointArray[3])
Set TempPointArray[1] = (Position of ChainHookDummys[(TempInteger2 + 1)])
Set TempPointArray[2] = (Position of ChainHookDummys[TempInteger2])
Unit - Move ChainHookDummys[TempInteger2] instantly to TempPoint, facing (Angle from TempPointArray[1] to TempPointArray[2]) degrees
Custom script: call RemoveLocation (udg_TempPointArray[1])
Custom script: call RemoveLocation (udg_TempPointArray[2])
Custom script: call RemoveLocation (udg_TempPoint)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(MUICaster[TempInteger] is dead) Equal to True
(MUITarget[TempInteger] is dead) Equal to True
ChainHookDistance[TempInteger] Greater than or equal to (500.00 + (15.00 x (Real((Level of Chain Hook for MUICaster[TempInteger])))))
Then - Actions
Set MUITarget[TempInteger] = MUICaster[TempInteger]
Else - Actions