Super.Gnome
New Member
- Reaction score
- 0
I'm stealing an ability from dota. The chronosphere ability pauses everything in an area, and everything that enters that area during the duration. It takes me two simple triggers to accomplish the effect.
And
The problem I have is that the second trigger leaks a unit group. But if I clear that leak I can't unpause the units in the first trigger.
Any ideas on how to clear the leak, and maintain a functional spell? I'm sure there is a way...
Trigger:
- ChronoSphere
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Chronosphere
- Actions
- Set CS_Point = (Target point of ability being cast)
- Set CS_Caster = (Casting unit)
- Trigger - Turn on Chronosphere Effect <gen>
- Unit - Create 1 ChronoSphere for (Owner of (Triggering unit)) at CS_Point facing Default building facing degrees
- Set CSdummy = (Last created unit)
- Set CS_effect = (Last created special effect)
- Wait (2.00 x (Real((Level of Chronosphere for (Triggering unit))))) seconds
- Trigger - Turn off Chronosphere Effect <gen>
- Unit - Remove CSdummy from the game
- Unit Group - Pick every unit in CS_Group and do (Unit - Unpause (Picked unit))
- Custom script: call RemoveLocation (udg_CS_Point)
- Events
And
Trigger:
- Chronosphere Effect
- Events
- Time - Every 0.01 seconds of game time
- Conditions
- Actions
- Set CS_Group = (Units within 500.00 of CS_Point matching (((Matching unit) Not equal to CS_Caster) and ((((Triggering unit) is A structure) Equal to False) and (((Triggering unit) is Magic Immune) Equal to False))))
- Unit Group - Remove CSdummy from CS_Group
- Unit Group - Pick every unit in CS_Group and do (Unit - Pause (Picked unit))
- Events
The problem I have is that the second trigger leaks a unit group. But if I clear that leak I can't unpause the units in the first trigger.
Any ideas on how to clear the leak, and maintain a functional spell? I'm sure there is a way...