Hi everyone, i made a spell (with friend's help) that does:
It runs ok with 180 or 360 degrees (casting position):
But it cause errors at this angle:
Here's my triggers, im still dont know about the angle-triggers, please help me
Main trigger:
Call 3 Lizards run to the target point, start from your back 400 distance. Deals damages to any enemies who block the lizards
It runs ok with 180 or 360 degrees (casting position):

But it cause errors at this angle:

Here's my triggers, im still dont know about the angle-triggers, please help me

Main trigger:
-
Stamping Destruction
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to (==) Stamping Destruction
-
-
Actions
-
Set SD_Caster = (Casting unit)
-
Set SD_Loc[0] = (Position of SD_Caster)
-
Set SD_Loc[1] = (Target point of ability being cast)
-
Set SD_Angle[1] = (Angle from SD_Loc[0] to SD_Loc[1])
-
-------- Set dummies spawn location (behind caster 400 range) --------
-
Set SD_Loc[2] = (SD_Loc[0] offset by -400.00 towards (SD_Angle[1] x -1.00) degrees)
-
Set SD_Loc[3] = (SD_Loc[2] offset by 200.00 towards (SD_Angle[1] + 90.00) degrees)
-
Set SD_Loc[4] = (SD_Loc[2] offset by 200.00 towards (SD_Angle[1] - 90.00) degrees)
-
Set SD_Distance = (Distance between SD_Loc[1] and SD_Loc[2])
-
Unit - Create 1 Stamping Destruction Dummy for (Owner of SD_Caster) at SD_Loc[2] facing SD_Angle[1] degrees
-
Set SD_Dummy[1] = (Last created unit)
-
Unit - Create 1 Stamping Destruction Dummy for (Owner of SD_Caster) at SD_Loc[3] facing SD_Angle[1] degrees
-
Set SD_Dummy[2] = (Last created unit)
-
Unit - Create 1 Stamping Destruction Dummy for (Owner of SD_Caster) at SD_Loc[4] facing SD_Angle[1] degrees
-
Set SD_Dummy[3] = (Last created unit)
-
Unit - Add Crow Form to SD_Dummy[1]
-
Unit - Add Crow Form to SD_Dummy[2]
-
Unit - Add Crow Form to SD_Dummy[3]
-
Unit - Remove Crow Form from SD_Dummy[1]
-
Unit - Remove Crow Form from SD_Dummy[2]
-
Unit - Remove Crow Form from SD_Dummy[3]
-
Unit Group - Remove all units from SD_Hit
-
Trigger - Turn on Stamping Destruction Move <gen>
-
Custom script: call RemoveLocation( udg_SD_Loc[0] )
-
Custom script: call RemoveLocation( udg_SD_Loc[1] )
-
Custom script: call RemoveLocation( udg_SD_Loc[2] )
-
Custom script: call RemoveLocation( udg_SD_Loc[3] )
-
Custom script: call RemoveLocation( udg_SD_Loc[4] )
-
-
-
Stamping Destruction Move
-
Events
-
Time - Every 0.01 seconds of game time
-
-
Conditions
-
Actions
-
-------- Setup locations --------
-
Set SD_Loc[1] = (Position of SD_Dummy[1])
-
Set SD_Loc[2] = (Position of SD_Dummy[2])
-
Set SD_Loc[3] = (Position of SD_Dummy[3])
-
Set SD_Angle[2] = (Facing of SD_Dummy[1])
-
Set SD_Angle[3] = (Facing of SD_Dummy[2])
-
Set SD_Angle[4] = (Facing of SD_Dummy[3])
-
-------- Set point offset --------
-
Set SD_Loc[4] = (SD_Loc[1] offset by 10.00 towards SD_Angle[2] degrees)
-
Set SD_Loc[5] = (SD_Loc[2] offset by 10.00 towards SD_Angle[3] degrees)
-
Set SD_Loc[6] = (SD_Loc[3] offset by 10.00 towards SD_Angle[4] degrees)
-
-------- Move dummies --------
-
Unit - Move SD_Dummy[1] instantly to SD_Loc[4]
-
Unit - Move SD_Dummy[2] instantly to SD_Loc[5]
-
Unit - Move SD_Dummy[3] instantly to SD_Loc[6]
-
-------- -6 distance every 0.01s --------
-
Set SD_Distance = (SD_Distance - 6.00)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SD_Distance Less than or equal to (<=) 0.00
-
-
Then - Actions
-
Unit - Kill SD_Dummy[1]
-
Unit - Kill SD_Dummy[2]
-
Unit - Kill SD_Dummy[3]
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-------- Pick around dummy 1 --------
-
Set SD_Group = (Units within 200.00 of SD_Loc[1] matching ((((Matching unit) is A structure) Equal to (==) False) and ((((Matching unit) is alive) Equal to (==) True) and ((((Matching unit) belongs to an enemy of (Owner of SD_Caster)) Equal to (==) True) and (((Matching uni
-
Unit Group - Pick every unit in SD_Group and do (Actions)
-
Loop - Actions
-
Unit - Cause SD_Caster to damage (Picked unit), dealing ((0.00 + (50.00 x (Real((Level of Stamping Destruction for SD_Caster))))) + (0.75 x (Real((Intelligence of SD_Caster (Include bonuses)))))) damage of attack type Spells and damage type Magic
-
Unit Group - Add (Picked unit) to SD_Hit
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
Custom script: call DestroyGroup( udg_SD_Group )
-
-------- Pick around dummy 2 --------
-
Set SD_Group = (Units within 200.00 of SD_Loc[2] matching ((((Matching unit) is A structure) Equal to (==) False) and ((((Matching unit) is alive) Equal to (==) True) and ((((Matching unit) belongs to an enemy of (Owner of SD_Caster)) Equal to (==) True) and (((Matching uni
-
Unit Group - Pick every unit in SD_Group and do (Actions)
-
Loop - Actions
-
Unit - Cause SD_Caster to damage (Picked unit), dealing ((0.00 + (50.00 x (Real((Level of Stamping Destruction for SD_Caster))))) + (0.75 x (Real((Intelligence of SD_Caster (Include bonuses)))))) damage of attack type Spells and damage type Magic
-
Unit Group - Add (Picked unit) to SD_Hit
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
Custom script: call DestroyGroup( udg_SD_Group )
-
-------- Pick around dummy 3 --------
-
Set SD_Group = (Units within 200.00 of SD_Loc[3] matching ((((Matching unit) is A structure) Equal to (==) False) and ((((Matching unit) is alive) Equal to (==) True) and ((((Matching unit) belongs to an enemy of (Owner of SD_Caster)) Equal to (==) True) and (((Matching uni
-
Unit Group - Pick every unit in SD_Group and do (Actions)
-
Loop - Actions
-
Unit - Cause SD_Caster to damage (Picked unit), dealing ((0.00 + (50.00 x (Real((Level of Stamping Destruction for SD_Caster))))) + (0.75 x (Real((Intelligence of SD_Caster (Include bonuses)))))) damage of attack type Spells and damage type Magic
-
Unit Group - Add (Picked unit) to SD_Hit
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
Custom script: call DestroyGroup( udg_SD_Group )
-
-
-
-
-------- remove point leak --------
-
Custom script: call RemoveLocation( udg_SD_Loc[0] )
-
Custom script: call RemoveLocation( udg_SD_Loc[1] )
-
Custom script: call RemoveLocation( udg_SD_Loc[2] )
-
Custom script: call RemoveLocation( udg_SD_Loc[3] )
-
Custom script: call RemoveLocation( udg_SD_Loc[4] )
-
Custom script: call RemoveLocation( udg_SD_Loc[5] )
-
Custom script: call RemoveLocation( udg_SD_Loc[6] )
-
-