I just made a spell multiple ensnare and it isn't working. I cant figure out what's wrong with the trigger
Code:
Ensnare
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Multiple Ensnare
Actions
Set Multiple_Ensnare_Cast_Location = (Position of (Triggering unit))
Set Multiple_Ensnare_Target_Point = (Position of (Target unit of ability being cast))
Set Multiple_Ensnare_Units_Around = (Units within 300.00 of Multiple_Ensnare_Target_Point)
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Multiple_Ensnare_Cast_Location facing (Facing of (Triggering unit)) degrees
Set Multiple_Ensnare_Casting_Unit = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Set level of Ensnare (Multiple Nets) for Multiple_Ensnare_Casting_Unit to (Level of Multiple Ensnare for (Triggering unit))
Unit Group - Pick every unit in Multiple_Ensnare_Units_Around and do (Actions)
Loop - Actions
Unit - Order Multiple_Ensnare_Casting_Unit to Orc Raider - Ensnare (Picked unit)
Custom script: call RemoveLocation (udg_Multiple_Ensnare_Cast_Location)
Custom script: call RemoveLocation (udg_Multiple_Ensnare_Target_Point)
Custom script: call DestroyGroup (udg_Multiple_Ensnare_Units_Around)