This trigger is supposed to cast on units up to 800 range in a 60-degree arc in front of the caster. The problem is it won't work on units that are below and to the left of the caster, no matter if the caster is facing them or not.
It's definitely the angle check because the spell always works if I just have it cast on all units in 800 range.
I even tried setting the "Facing minus 30" to "Facing plus 330" and it still did not work.
Here is the part of the spell that's fucking up, and below it is the full spell for context.
It's definitely the angle check because the spell always works if I just have it cast on all units in 800 range.
I even tried setting the "Facing minus 30" to "Facing plus 330" and it still did not work.
Here is the part of the spell that's fucking up, and below it is the full spell for context.
-
Infernal Wave 1
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to SRC.A1 - Infernal Wave [W]
-
-
Actions
-
Set temp_point[0] = (Position of (Triggering unit))
-
Set temp_group = (Units within 800.00 of temp_point[0] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to False) and (((Matching unit) is Mechanical) Equal to False))))
-
Unit Group - Pick every unit in temp_group and do (Actions)
-
Loop - Actions
-
Set temp_point[1] = (Position of (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Angle from temp_point[0] to temp_point[1]) Less than or equal to ((Facing of (Triggering unit)) + 30.00)
-
(Angle from temp_point[0] to temp_point[1]) Greater than or equal to ((Facing of (Triggering unit)) - 30.00)
-
-
Then - Actions
-
Set temp_point[2] = (temp_point[0] offset by 50.00 towards (Angle from temp_point[0] to temp_point[1]) degrees)
-
Unit - Create 1 infernalwave for (Owner of (Triggering unit)) at temp_point[2] facing (Angle from temp_point[0] to temp_point[1]) degrees
-
Custom script: call RemoveLocation( udg_temp_point[1] )
-
Custom script: call RemoveLocation( udg_temp_point[2] )
-
-
-
-
-
-
-
Infernal Wave 1
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to SRC.A1 - Infernal Wave [W]
-
-
Actions
-
Set current_hashtable = H_InfernalWave
-
Set current_group = InfernalWaveMissles
-
Set SpellDamage_Base = 45.00
-
Set SpellDamage_Level = 35.00
-
Set Spellpower_Coefficient = 0.70
-
Set temp_point[0] = (Position of (Triggering unit))
-
Set temp_group = (Units within 800.00 of temp_point[0] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to False) and (((Matching unit) is Mechanical) Equal to False))))
-
Unit Group - Pick every unit in temp_group and do (Actions)
-
Loop - Actions
-
Set temp_point[1] = (Position of (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Angle from temp_point[0] to temp_point[1]) Less than or equal to ((Facing of (Triggering unit)) + 30.00)
-
(Angle from temp_point[0] to temp_point[1]) Greater than or equal to ((Facing of (Triggering unit)) - 30.00)
-
-
Then - Actions
-
Set temp_point[2] = (temp_point[0] offset by 50.00 towards (Angle from temp_point[0] to temp_point[1]) degrees)
-
Unit - Create 1 infernalwave for (Owner of (Triggering unit)) at temp_point[2] facing (Angle from temp_point[0] to temp_point[1]) degrees
-
Custom script: call RemoveLocation( udg_temp_point[1] )
-
Custom script: call RemoveLocation( udg_temp_point[2] )
-
Hashtable - Save ((SpellDamage_Base + (SpellDamage_Level x (Real((Level of (Ability being cast) for (Triggering unit)))))) + (Spellpower_Coefficient x (Load 100 of (Key (Triggering unit)) from H_Spellpower))) as (Key damage) of (Key (Last created unit)) in current_hashtable
-
Hashtable - Save Handle Of(Triggering unit) as (Key caster) of (Key (Last created unit)) in current_hashtable
-
Hashtable - Save Handle Of(Picked unit) as (Key target) of (Key (Last created unit)) in current_hashtable
-
Hashtable - Save 600.00 as (Key speed) of (Key (Last created unit)) in current_hashtable
-
Hashtable - Save 30.00 as (Key speedmod) of (Key (Last created unit)) in current_hashtable
-
Unit Group - Add (Last created unit) to current_group
-
-
Else - Actions
-
-
Unit Group - Remove (Picked unit) from temp_group
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Infernal Wave 2 <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on Infernal Wave 2 <gen>
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation( udg_temp_point[0] )
-
Custom script: call DestroyGroup( udg_temp_group )
-
Custom script: set udg_current_hashtable = null
-
Custom script: set udg_current_group = null
-
-