- Joined
- May 11, 2012
- Messages
- 2,108
This spell sometimes crashes the game when there are lotsa enemies around you. I have no idea why it does so, but I suspect it could be lightning.
-
Death Hand
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Death Hand
-
-
Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
Set DH_MaxIndex = (DH_MaxIndex + 1)
-
Set DH_TrigUnit[DH_MaxIndex] = (Triggering unit)
-
Set DH_TargetUnit[DH_MaxIndex] = (Target unit of ability being cast)
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Set DH_Point = (Position of DH_TrigUnit[DH_MaxIndex])
-
Set DH_Point2 = (Position of DH_TargetUnit[DH_MaxIndex])
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Unit - Turn collision for DH_TargetUnit[DH_MaxIndex] Off
-
Lightning - Create a Magic Leash lightning effect from source DH_Point to target DH_Point2
-
Lightning - Change color of DH_Lightning[DH_MaxIndex] to (67.00 12.00 49.00) with 1.00 alpha
-
Set DH_Lightning[DH_MaxIndex] = (Last created lightning effect)
-
-------- ------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DH_MaxIndex Equal to 1
-
-
Then - Actions
-
Trigger - Turn on Death Hand Loop <gen>
-
-
Else - Actions
-
-
-------- ------------------------------------------------------------------------------------- --------
-
-------- ------------------------------------------------------------------------------------- --------
-
Custom script: call RemoveLocation(udg_DH_Point)
-
Custom script: call RemoveLocation(udg_DH_Point2)
-
Custom script: set udg_DH_Point = null
-
Custom script: set udg_DH_Point2 = null
-
-
-
Death Hand Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Custom script: local integer zOffset = 80
-
-------- ------------------------------------------------------------------------------------- --------
-
For each (Integer DH_Loop) from 1 to DH_MaxIndex, do (Actions)
-
Loop - Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
Set DH_Point = (Position of DH_TrigUnit[DH_Loop])
-
Set DH_Point2 = (Position of DH_TargetUnit[DH_Loop])
-
Set DH_Angle = (Angle from DH_Point2 to DH_Point)
-
-------- ------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Distance between DH_Point and DH_Point2) Less than or equal to 75.00
-
(Life of DH_TargetUnit[DH_Loop]) Less than or equal to 0.41
-
-
-
-
Then - Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
Lightning - Destroy DH_Lightning[DH_Loop]
-
-------- ------------------------------------------------------------------------------------- --------
-
Unit - Turn collision for DH_TargetUnit[DH_Loop] On
-
Unit - Create 1 Dummy Caster for (Owner of DH_TrigUnit[DH_Loop]) at DH_Point2 facing Default building facing degrees
-
Set TempDummyUnit = (Last created unit)
-
Unit - Add a 0.50 second Generic expiration timer to TempDummyUnit
-
Unit - Add Dummy Death Hand to TempDummyUnit
-
Unit - Set level of Dummy Death Hand for TempDummyUnit to (Level of Death Hand for DH_TrigUnit[DH_Loop])
-
Unit - Order TempDummyUnit to Orc Tauren Chieftain - War Stomp
-
Special Effect - Create a special effect at DH_Point2 using war3mapImported\DarkNova.mdx
-
Special Effect - Destroy (Last created special effect)
-
-------- ------------------------------------------------------------------------------------- --------
-
Set DH_TrigUnit[DH_Loop] = DH_TrigUnit[DH_MaxIndex]
-
Set DH_TrigUnit[DH_MaxIndex] = No unit
-
Set DH_TargetUnit[DH_Loop] = DH_TargetUnit[DH_MaxIndex]
-
Set DH_TargetUnit[DH_MaxIndex] = No unit
-
Set DH_Lightning[DH_Loop] = DH_Lightning[DH_MaxIndex]
-
Set DH_MaxIndex = (DH_MaxIndex - 1)
-
Set DH_Loop = (DH_Loop - 1)
-
-
Else - Actions
-
-------- ------------------------------------------------------------------------------------- --------
-
Set DH_Point3 = (DH_Point2 offset by 12.50 towards DH_Angle degrees)
-
Unit - Order DH_TargetUnit[DH_Loop] to Stop
-
Unit - Make DH_TargetUnit[DH_Loop] face DH_Point over 0.00 seconds
-
Custom script: call SetUnitX(udg_DH_TargetUnit[udg_DH_Loop], GetLocationX(udg_DH_Point3))
-
Custom script: call SetUnitY(udg_DH_TargetUnit[udg_DH_Loop], GetLocationY(udg_DH_Point3))
-
Custom script: call MoveLightningEx(udg_DH_Lightning[udg_DH_Loop], true, GetLocationX(udg_DH_Point), GetLocationY(udg_DH_Point), GetLocationZ(udg_DH_Point)+zOffset, GetLocationX(udg_DH_Point2), GetLocationY(udg_DH_Point2), GetLocationZ(udg_DH_Point2)+zOffset)
-
Custom script: call RemoveLocation(udg_DH_Point3)
-
-------- ------------------------------------------------------------------------------------- --------
-
-
-
-------- ------------------------------------------------------------------------------------- --------
-
Custom script: call RemoveLocation(udg_DH_Point)
-
Custom script: call RemoveLocation(udg_DH_Point2)
-
-------- ------------------------------------------------------------------------------------- --------
-
-
-
-------- ------------------------------------------------------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DH_MaxIndex Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-------- ------------------------------------------------------------------------------------- --------
-
Custom script: set udg_DH_Point = null
-
Custom script: set udg_DH_Point2 = null
-
Custom script: set udg_DH_Point3 = null
-
-