- Joined
- Apr 3, 2012
- Messages
- 31
I'm currently making a "boomerang" ability, which is simply a shockwave that returns to
the location of the caster. This is achieved by spawning a dummy unit with an identical ability with a .75 second cast timer.
Now, I'm having problems with defining the point that the unit should spawn. Since it should spawn at the max range of the shockwave ability, I can't use Target point of ability being cast. Based on some other questions I found online, the following should work:
I also tried basing the point on the facing angle of the casting unit:
Does anyone know how I should trigger this to make it work properly?
the location of the caster. This is achieved by spawning a dummy unit with an identical ability with a .75 second cast timer.
Now, I'm having problems with defining the point that the unit should spawn. Since it should spawn at the max range of the shockwave ability, I can't use Target point of ability being cast. Based on some other questions I found online, the following should work:
-
Boomerang
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Boomerang
-
-
Actions
-
Set aa_TempUnit = (Casting Unit)
-
Set aa_TempPoint = (Position of aa_TempUnit)
-
Set aa_TempPoint2 = (aa_TempPoint offset by 1000.00 towards (Angle from aa_TempPoint to aa_TempPoint2) degrees)
-
Unit - Create 1 Dummy for (Owner of aa_TempUnit) at aa_TempPoint2 facing Default building facing degrees
-
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
-
Unit - Add Boomerang (Dummy) to (Last created unit)
-
Unit - Set level of Boomerang (Dummy) for (Last created unit) to (Level of Boomerang for aa_TempUnit
-
Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm aa_TempPoint
-
Custom script: call RemoveLocation(udg_aa_TempPoint)
-
Custom script: call RemoveLocation(udg_aa_TempPoint2)
-
-
I also tried basing the point on the facing angle of the casting unit:
-
Set aa_TempPoint2 = (aa_TempPoint offset by 1000.00 towards (Facing of aa_TempUnit) degrees)
Does anyone know how I should trigger this to make it work properly?