AEK
New Member
- Reaction score
- 0
Ok i has some help creating a massing trigger yesterday. It worked by a certain spell being cast (in this case "Mass Middle") which causes all units excluding heroes and wisps to the mass point. Here is the trigger:
I also made separate triggers to move to a different area (in this case the bottom base, or blues base), using the same trigger with the point variable being changed to blues base, and requiring a different spell being cast (Mass Blue). Here is the code:
For some reason, since i added the triggers to mass blue's base (and the triggers for the other bases), all of the massing triggers send units to blues base, instead of sending units to the base/region i want them to.
Can anyone see why this is happening? I've gone through the code multiple times and i cannot see why this occurs.
Thanks in advance, AEK.
Code:
Massing Mid
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Mass Middle
Actions
Set Mass_tmp_group = (Units owned by (Owner of (Triggering unit)) matching (((Unit-type of (Matching unit)) Not equal to Base Wisp) and ((((Matching unit) is A Hero) Equal to False) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))))
Set Mass_tmp_point = (Center of Mid <gen>)
Unit Group - Pick every unit in Mass_tmp_group and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Attack-Move To Mass_tmp_point
Custom script: call DestroyGroup (udg_Mass_tmp_group)
Custom script: call RemoveLocation (udg_Mass_tmp_point)
I also made separate triggers to move to a different area (in this case the bottom base, or blues base), using the same trigger with the point variable being changed to blues base, and requiring a different spell being cast (Mass Blue). Here is the code:
Code:
Massing Blue
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Mass Blue
Actions
Set Mass_tmp_group = (Units owned by (Owner of (Triggering unit)) matching (((Unit-type of (Matching unit)) Not equal to Base Wisp) and ((((Matching unit) is A Hero) Equal to False) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))))
Set Mass_tmp_point = (Center of Blue Base <gen>)
Unit Group - Pick every unit in Mass_tmp_group and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Attack-Move To Mass_tmp_point
Custom script: call DestroyGroup (udg_Mass_tmp_group)
Custom script: call RemoveLocation (udg_Mass_tmp_point)
For some reason, since i added the triggers to mass blue's base (and the triggers for the other bases), all of the massing triggers send units to blues base, instead of sending units to the base/region i want them to.
Can anyone see why this is happening? I've gone through the code multiple times and i cannot see why this occurs.
Thanks in advance, AEK.