I have created a working Mass Teleport ability out of Channel which requires no targets and teleports allies. I want to know how to clear the leaks in the second trigger if the spell is interrupted before it takes place. I have to use the variables that need cleared, which are setup in the first part, for the second part to work.
Also, how do I make it so that in the second trigger, not only are structures ignored, but also wards are ignored?
-
Mass Teleport Human Sorc
-
Events
-
Unit - A unit Begins channeling an ability
-
-
Conditions
-
(Ability being cast) Equal to Mass Teleport (Human Sorceress)
-
-
Actions
-
Set MassT_Caster = (Casting unit)
-
Set MassT_Point = (Target point of ability being cast)
-
Set MassT_CasterLoc = (Position of (Casting unit))
-
Special Effect - Create a special effect at MassT_CasterLoc using Abilities\Spells\Undead\ReplenishMana\ReplenishManaCasterOverhead.mdl
-
Set MassT_Effect = (Last created special effect)
-
Countdown Timer - Start MassT_EffectTimer as a One-shot timer that will expire in 5.00 seconds
-
Special Effect - Set Scale of (Last created special effect) to 5.00
-
Special Effect - Set Time Scale of MassT_Effect to 0.40
-
Trigger - Turn on Mass Teleport Human Sorc2 <gen>
-
Trigger - Turn on Mass Teleport Human Sorc3 <gen>
-
-
-
Mass Teleport Human Sorc2
-
Events
-
Unit - A unit Finishes casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Mass Teleport (Human Sorceress)
-
-
Actions
-
Set MassT_Group = (Units within 500.00 of MassT_CasterLoc matching (((Matching unit) belongs to an ally of (Owner of MassT_Caster)) Equal to True))
-
Unit Group - Pick every unit in MassT_Group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is A structure) Equal to False
-
-
Then - Actions
-
Unit - Move (Picked unit) instantly to MassT_Point
-
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-
-
-
Custom script: call DestroyGroup(udg_MassT_Group)
-
Custom script: call RemoveLocation(udg_MassT_Point)
-
Custom script: call RemoveLocation(udg_MassT_CasterLoc)
-
Trigger - Turn off (This trigger)
-
-
-
Mass Teleport Human Sorc3
-
Events
-
Time - MassT_EffectTimer expires
-
-
Conditions
-
Actions
-
Special Effect - Destroy MassT_Effect
-
Trigger - Turn off (This trigger)
-
-
Also, how do I make it so that in the second trigger, not only are structures ignored, but also wards are ignored?
Last edited: