- Joined
- Feb 9, 2009
- Messages
- 1,814
Having an snag where the unit in motion suddenly stops upon hitting a valid target
at my wit's end with this.
at my wit's end with this.
-
Then - Actions
-

Set HM_Point_Dummy[HM_AAAKey] = (Position of HM_Unit_Dummy[HM_AAAKey])
-

Set HM_TGroup = (Units within 1000.00 of HM_Point_Dummy[HM_AAAKey] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of HM_Unit_Dummy[HM_AAAKey])) Equal to True) and (((Matching unit) is visible to (Owner of HM_Unit_Dum
-

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


If - Conditions
-



(Random unit from HM_TGroup) Equal to No unit
-
-


Then - Actions
-



Set HM_Unit_Target[HM_AAAKey] = (Random unit from HM_TGroup)
-



Custom script: call DestroyGroup( udg_HM_TGroup)
-
-


Else - Actions
-



Custom script: call RemoveLocation (udg_HM_Point_Dummy[udg_HM_AAAKey])
-



Custom script: call DestroyGroup( udg_HM_TGroup)
-



Set HM_Unit_Target[HM_AAAKey] = No unit
-



Set HM_Duration[HM_AAAKey] = 1.00
-



Skip remaining actions
-
-
-
-
HM Loop
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


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



Loop - Actions
-




Set HM_AAAKey = (Custom value of (Picked unit))
-




Set HM_Unit_Dummy[HM_AAAKey] = (Picked unit)
-




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





If - Conditions
-






HM_Duration[HM_AAAKey] Greater than 0.00
-
-





Then - Actions
-






Set HM_Duration[HM_AAAKey] = (HM_Duration[HM_AAAKey] - 0.03)
-






-------- --------
-






Set HM_Point_Dummy[HM_AAAKey] = (Position of HM_Unit_Dummy[HM_AAAKey])
-






Set HM_Point_Caster[HM_AAAKey] = (Position of HM_Unit_Caster[HM_AAAKey])
-






Set HM_real[1] = (Facing of HM_Unit_Dummy[HM_AAAKey])
-






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







If - Conditions
-








(Distance between HM_Point_Caster[HM_AAAKey] and HM_Point_Dummy[HM_AAAKey]) Greater than or equal to 400.00
-
-







Then - Actions
-








Set HM_real[2] = (Angle from HM_Point_Dummy[HM_AAAKey] to HM_Point_Caster[HM_AAAKey])
-
-







Else - Actions
-








Set HM_Point_Dummy_Offset[HM_AAAKey] = (HM_Point_Dummy[HM_AAAKey] offset by 2.50 towards HM_real[1] degrees)
-








Set HM_real[2] = (Angle from HM_Point_Dummy[HM_AAAKey] to HM_Point_Dummy_Offset[HM_AAAKey])
-
-
-






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







If - Conditions
-








(HM_real[2] - HM_real[1]) Greater than or equal to 180.00
-
-







Then - Actions
-








Set HM_real[1] = (HM_real[1] + 360.00)
-
-







Else - Actions
-








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









If - Conditions
-










(HM_real[2] - HM_real[1]) Less than or equal to -180.00
-
-









Then - Actions
-










Set HM_real[2] = (HM_real[2] + 360.00)
-
-









Else - Actions
-
-
-
-






Set HM_real[3] = ((HM_real[1] + HM_real[2]) / 2.00)
-






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







If - Conditions
-








(HM_real[3] - HM_real[1]) Greater than HM_TurnRate[HM_AAAKey]
-
-







Then - Actions
-








Set HM_real[3] = (HM_real[1] + HM_TurnRate[HM_AAAKey])
-
-







Else - Actions
-








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









If - Conditions
-










(HM_real[3] - HM_real[1]) Less than (-1.00 x HM_TurnRate[HM_AAAKey])
-
-









Then - Actions
-










Set HM_real[3] = (HM_real[1] - HM_TurnRate[HM_AAAKey])
-
-









Else - Actions
-
-
-
-






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







If - Conditions
-








HM_real[3] Less than 0.00
-
-







Then - Actions
-








Set HM_real[3] = (HM_real[3] + 360.00)
-
-







Else - Actions
-
-






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







If - Conditions
-








HM_real[3] Greater than 360.00
-
-







Then - Actions
-








Set HM_real[3] = (HM_real[3] - 360.00)
-
-







Else - Actions
-
-






-------- --------
-






-------- movement --------
-






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







If - Conditions
-








HM_real[1] Less than HM_real[3]
-
-







Then - Actions
-








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









If - Conditions
-










HM_real[3] Equal to 0.00
-
-









Then - Actions
-










Set HM_real[3] = 0.01
-
-









Else - Actions
-
-








Set HM_real[4] = (HM_real[1] / HM_real[3])
-
-







Else - Actions
-








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









If - Conditions
-










HM_real[1] Greater than HM_real[3]
-
-









Then - Actions
-










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











If - Conditions
-












HM_real[1] Equal to 0.00
-
-











Then - Actions
-












Set HM_real[1] = 0.01
-
-











Else - Actions
-
-










Set HM_real[4] = (HM_real[3] / HM_real[1])
-
-









Else - Actions
-










Set HM_real[4] = 1.00
-
-
-
-
-






-------- movement --------
-






-------- --------
-






-------- limit speed --------
-






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







If - Conditions
-








HM_real[4] Less than 0.19
-
-







Then - Actions
-








Set HM_real[4] = 0.19
-
-







Else - Actions
-
-






-------- limit speed --------
-






-------- --------
-






-------- speed: max speed * factor which is dependant on angle difference --------
-






Set HM_real[5] = (HM_Speed_Max[HM_AAAKey] x HM_real[4])
-






Set HM_Point_Dummy_Offset[HM_AAAKey] = (HM_Point_Dummy[HM_AAAKey] offset by HM_real[5] towards HM_real[3] degrees)
-






Unit - Move HM_Unit_Dummy[HM_AAAKey] instantly to HM_Point_Dummy_Offset[HM_AAAKey], facing HM_real[3] degrees
-






-------- speed: max speed * factor which is dependant on angle difference --------
-






-------- --------
-






-------- --------
-






-------- --------
-






Custom script: call RemoveLocation (udg_HM_Point_Dummy[udg_HM_AAAKey])
-






Custom script: call RemoveLocation (udg_HM_Point_Caster[udg_HM_AAAKey])
-






Custom script: call RemoveLocation (udg_HM_Point_Dummy_Offset[udg_HM_AAAKey])
-
-





Else - Actions
-






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







If - Conditions
-








HM_Unit_Target[HM_AAAKey] Equal to No unit
-
-







Then - Actions
-








Set HM_Point_Dummy[HM_AAAKey] = (Position of HM_Unit_Dummy[HM_AAAKey])
-








Set HM_TGroup = (Units within 1000.00 of HM_Point_Dummy[HM_AAAKey] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of HM_Unit_Dummy[HM_AAAKey])) Equal to True) and (((Matching unit) is visible to (Owner of HM_Unit_Dum
-








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









If - Conditions
-










(Random unit from HM_TGroup) Equal to No unit
-
-









Then - Actions
-










Set HM_Unit_Target[HM_AAAKey] = (Random unit from HM_TGroup)
-










Custom script: call DestroyGroup( udg_HM_TGroup)
-
-









Else - Actions
-










Custom script: call RemoveLocation (udg_HM_Point_Dummy[udg_HM_AAAKey])
-










Custom script: call DestroyGroup( udg_HM_TGroup)
-










Set HM_Unit_Target[HM_AAAKey] = No unit
-










Set HM_Duration[HM_AAAKey] = 1.00
-










Skip remaining actions
-
-
-
-







Else - Actions
-








Set HM_AAAKey = (Custom value of (Picked unit))
-








Set HM_Unit_Dummy[HM_AAAKey] = (Picked unit)
-








Set HM_Point_Dummy[HM_AAAKey] = (Position of HM_Unit_Dummy[HM_AAAKey])
-








Set HM_Point_Target[HM_AAAKey] = (Position of HM_Unit_Target[HM_AAAKey])
-








Set HM_Distance2[HM_AAAKey] = (Distance between HM_Point_Dummy[HM_AAAKey] and HM_Point_Target[HM_AAAKey])
-








-------- --------
-








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









If - Conditions
-










Or - Any (Conditions) are true
-











Conditions
-












HM_Distance2[HM_AAAKey] Less than or equal to 50.00
-
-
-
-









Then - Actions
-










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











If - Conditions
-












(HM_Unit_Target[HM_AAAKey] belongs to an enemy of (Owner of HM_Unit_Caster[HM_AAAKey])) Equal to False
-
-











Then - Actions
-












Unit - Set life of HM_Unit_Target[HM_Mui[2]] to ((Life of HM_Unit_Target[HM_Mui[2]]) + (HM_Damage[HM_Mui[2]] x 1.00))
-












Special Effect - Create a special effect attached to the origin of HM_Unit_Target[HM_Mui[2]] using DarknessLeechTarget_Portrait.mdx
-












Special Effect - Destroy (Last created special effect)
-
-











Else - Actions
-












Unit - Cause HM_Unit_Caster[HM_AAAKey] to damage HM_Unit_Target[HM_AAAKey], dealing HM_Damage[HM_AAAKey] damage of attack type Spells and damage type Normal
-












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













If - Conditions
-














(HM_Unit_Target[HM_AAAKey] is dead) Equal to True
-
-













Then - Actions
-














Set HM_Unit_Target[HM_AAAKey] = No unit
-














Set HM_Speed[HM_AAAKey] = 25.00
-














Set HM_Duration[HM_AAAKey] = 0.15
-














Special Effect - Create a special effect attached to the chest of HM_Unit_Target[HM_AAAKey] using BlueDemonHunterMissile.mdx
-














Special Effect - Destroy (Last created special effect)
-














Skip remaining actions
-
-













Else - Actions
-
-
-
-










Unit - Kill HM_Unit_Dummy[HM_AAAKey]
-










Unit Group - Remove HM_Unit_Dummy[HM_AAAKey] from HM_Group
-










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











If - Conditions
-












(Number of units in HM_Group) Less than or equal to 0
-
-











Then - Actions
-












Trigger - Turn off (This trigger)
-
-











Else - Actions
-
-
-









Else - Actions
-










Set HM_real[1] = (Facing of HM_Unit_Dummy[HM_Mui[2]])
-










Set HM_real[2] = (Angle from HM_Point_Dummy[HM_Mui[2]] to HM_Point_Target[HM_Mui[2]])
-










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











If - Conditions
-












(HM_real[2] - HM_real[1]) Greater than or equal to 180.00
-
-











Then - Actions
-












Set HM_real[1] = (HM_real[1] + 360.00)
-
-











Else - Actions
-












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













If - Conditions
-














(HM_real[2] - HM_real[1]) Less than or equal to -180.00
-
-













Then - Actions
-














Set HM_real[2] = (HM_real[2] + 360.00)
-
-













Else - Actions
-
-
-
-










Set HM_real[3] = ((HM_real[1] + HM_real[2]) / 2.00)
-










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











If - Conditions
-












(HM_real[3] - HM_real[1]) Greater than HM_TurnRate[HM_Mui[2]]
-
-











Then - Actions
-












Set HM_real[3] = (HM_real[1] + HM_TurnRate[HM_Mui[2]])
-
-











Else - Actions
-












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













If - Conditions
-














(HM_real[3] - HM_real[1]) Less than (-1.00 x HM_TurnRate[HM_Mui[2]])
-
-













Then - Actions
-














Set HM_real[3] = (HM_real[1] - HM_TurnRate[HM_Mui[2]])
-
-













Else - Actions
-
-
-
-










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











If - Conditions
-












HM_real[3] Less than 0.00
-
-











Then - Actions
-












Set HM_real[3] = (HM_real[3] + 360.00)
-
-











Else - Actions
-
-










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











If - Conditions
-












HM_real[3] Greater than 360.00
-
-











Then - Actions
-












Set HM_real[3] = (HM_real[3] - 360.00)
-
-











Else - Actions
-
-










-------- --------
-










-------- movement --------
-










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











If - Conditions
-












HM_real[1] Less than HM_real[3]
-
-











Then - Actions
-












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













If - Conditions
-














HM_real[3] Equal to 0.00
-
-













Then - Actions
-














Set HM_real[3] = 0.01
-
-













Else - Actions
-
-












Set HM_real[4] = (HM_real[1] / HM_real[3])
-
-











Else - Actions
-












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













If - Conditions
-














HM_real[1] Greater than HM_real[3]
-
-













Then - Actions
-














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















If - Conditions
-
















HM_real[1] Equal to 0.00
-
-















Then - Actions
-
















Set HM_real[1] = 0.01
-
-















Else - Actions
-
-














Set HM_real[4] = (HM_real[3] / HM_real[1])
-
-













Else - Actions
-














Set HM_real[4] = 1.00
-
-
-
-
-










-------- movement --------
-










-------- --------
-










-------- limit speed --------
-










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











If - Conditions
-












HM_real[4] Less than 0.50
-
-











Then - Actions
-












Set HM_real[4] = 0.50
-
-











Else - Actions
-
-










-------- limit speed --------
-










-------- --------
-










-------- speed: max speed * factor which is dependant on angle difference --------
-










Set HM_real[5] = (HM_Speed_Max[HM_Mui[2]] x HM_real[4])
-










Set HM_Point_Dummy_Offset[HM_Mui[2]] = (HM_Point_Dummy[HM_Mui[2]] offset by HM_real[5] towards HM_real[3] degrees)
-










Unit - Move HM_Unit_Dummy[HM_Mui[2]] instantly to HM_Point_Dummy_Offset[HM_Mui[2]], facing HM_real[3] degrees
-










-------- speed: max speed * factor which is dependant on angle difference --------
-










-------- --------
-
-
-








Custom script: call RemoveLocation (udg_HM_Point_Dummy_Offset[udg_HM_AAAKey])
-
-
-






Custom script: call RemoveLocation (udg_HM_Point_Target[udg_HM_AAAKey])
-






Custom script: call RemoveLocation (udg_HM_Point_Dummy[udg_HM_AAAKey])
-
-
-
-
-
-
-
[trigger]









