- Joined
- Jul 18, 2010
- Messages
- 332
I want to make a skill that homes in a projectile at a targeted unit but as it homes in to the target, it moves around the target too. This is my trigger so far but it still doesn't work.
-
projectile spell 16
-

Events
-


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

Conditions
-


(Ability being cast) Equal to Spectre Devour
-
-

Actions
-


Set projectileunit_Copy = (Triggering unit)
-


Set projectilepoint_Copy = (Position of (Triggering unit))
-


Set projectiletarget_Copy = (Position of (Target unit of ability being cast))
-


Set projectiletime_Copy = 5.00
-


Set projectileangle_Copy = (Angle from projectilepoint_Copy to projectiletarget_Copy)
-


Set projectileangle = (Angle from projectilepoint_Copy to projectiletarget_Copy)
-


Special Effect - Create a special effect at projectilepoint_Copy using BlackChakraExplosion.mdx
-


Special Effect - Destroy (Last created special effect)
-


Unit - Create 1 spectre devour for (Owner of (Triggering unit)) at projectilepoint_Copy facing (Facing of (Triggering unit)) degrees
-


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


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


Hashtable - Save projectiletime_Copy as 4 of (Key (Last created unit)) in projectilehashtable
-


Hashtable - Save projectileangle_Copy as 5 of (Key (Last created unit)) in projectilehashtable
-


Hashtable - Save Handle Ofprojectileunit_Copy as 6 of (Key (Last created unit)) in projectilehashtable
-


Hashtable - Save Handle Of(Target unit of ability being cast) as 7 of (Key (Last created unit)) in projectilehashtable
-


Unit - Create 1 spectre devour for (Owner of (Triggering unit)) at projectilepoint_Copy facing (Facing of (Triggering unit)) degrees
-


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


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


Hashtable - Save projectiletime_Copy as 4 of (Key (Last created unit)) in projectilehashtable
-


Hashtable - Save projectileangle_Copy as 5 of (Key (Last created unit)) in projectilehashtable
-


Hashtable - Save Handle Ofprojectileunit_Copy as 6 of (Key (Last created unit)) in projectilehashtable
-


Hashtable - Save Handle Of(Target unit of ability being cast) as 7 of (Key (Last created unit)) in projectilehashtable
-


Trigger - Turn on projectile spell Copy 16 <gen>
-


Custom script: call RemoveLocation (udg_projectilepoint_Copy)
-


Custom script: call RemoveLocation (udg_projectiletarget_Copy)
-
-
-
projectile spell Copy 16
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


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



Loop - Actions
-




Set projectiletime_Copy = (Load 4 of (Key (Picked unit)) from projectilehashtable)
-




Set projectileangle_Copy = (Load 5 of (Key (Picked unit)) from projectilehashtable)
-




Set projectileunit_Copy = (Load 6 of (Key (Picked unit)) in projectilehashtable)
-




Set projectileunit = (Load 7 of (Key (Picked unit)) in projectilehashtable)
-




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





If - Conditions
-






(Load 4 of (Key (Picked unit)) from projectilehashtable) Greater than 0.00
-
-





Then - Actions
-






Set projectiletarget_Copy = (Position of projectileunit)
-






Set projectiletargetpoint_Copy_2 = (Position of (Picked unit))
-






Set projectileangle_Copy = ((Angle from projectiletargetpoint_Copy_2 to projectiletarget_Copy) + projectileangle)
-






Set projectiletargetpoint_Copy_Copy = (projectiletargetpoint_Copy_2 offset by 21.00 towards projectileangle_Copy degrees)
-






Unit - Move (Picked unit) instantly to projectiletargetpoint_Copy_Copy, facing (Facing of (Picked unit)) degrees
-






Set projectileangle = (projectileangle_Copy - 12.00)
-






Set projectiletargetgroup_Copy = (Units within 100.00 of projectiletargetpoint_Copy_Copy matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of (Picked unit))) Equal to False) and (((R
-






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







Loop - Actions
-








Trigger - Turn on spectre devour <gen>
-








Trigger - Turn on spectre devour Copy <gen>
-








Special Effect - Create a special effect at projectiletargetpoint_Copy_2 using BlackChakraExplosion.mdx
-








Special Effect - Destroy (Last created special effect)
-








Special Effect - Create a special effect at projectiletargetpoint_Copy_2 using DarkChakraExplosion.mdx
-








Special Effect - Destroy (Last created special effect)
-








Set spectretime = 6.00
-








Hashtable - Save spectretime as 4 of (Key (Picked unit)) in projectilehashtable
-








Unit Group - Add (Picked unit) to spectregroup
-








Unit - Hide (Picked unit)
-








Unit - Pause (Picked unit)
-








Unit - Create 1 Death Spectre for (Owner of projectileunit_Copy) at projectiletargetpoint_Copy_2 facing (Facing of (Picked unit)) degrees
-








Hashtable - Save Handle Ofspectreunit as 6 of (Key (Picked unit)) in projectilehashtable
-








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








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






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







If - Conditions
-








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







Then - Actions
-








Unit - Remove (Picked unit) from the game
-
-







Else - Actions
-
-






Custom script: call DestroyGroup(udg_projectiletargetgroup_Copy)
-






Custom script: call RemoveLocation (udg_projectiletargetpoint_Copy_2)
-






Custom script: call RemoveLocation (udg_projectiletargetpoint_Copy_Copy)
-






Custom script: call RemoveLocation (udg_projectiletarget_Copy)
-






Hashtable - Save (projectiletime_Copy - 0.03) as 4 of (Key (Picked unit)) in projectilehashtable
-
-





Else - Actions
-






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




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





If - Conditions
-






(Load 4 of (Key (Picked unit)) from projectilehashtable) Equal to 0.00
-
-





Then - Actions
-






Animation - Reset (Picked unit)'s animation
-






Unit Group - Remove (Picked unit) from projectilegroup_Copy_15
-






Unit - Kill (Picked unit)
-
-





Else - Actions
-
-
-
-


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



If - Conditions
-




(Number of units in projectilegroup_Copy_15) Equal to 0
-
-



Then - Actions
-




Trigger - Turn off (This trigger)
-
-



Else - Actions
-




Do nothing
-
-
-
-

