GUI Chronosphere leak

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.

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)


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))



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...
 
Well, you can simply have one single unit-group which you only add and remove units from, instead of creating a new on each 0.01 seconds. (I'd recommend you increasing this to maybe 0.05, or 0.1 or so ;)

Like this then:
Trigger:
  • Set CS_TempGroup = (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_TempGroup
    • Unit Group - Pick every unit in CS_TempGroup and do (Unit - Pause (Picked unit))
    • Unit Group - Add all units of CS_TempGroup to CS_Group
    • Custom Script: call DestroyGroup(udg_CS_TempGroup)


Freehanded... Don't have WE with me :(
 
It might be better if you pause them in the "ChronoSphere" trigger and at the end or somewhere in this trigger to start a timer that will expire in "[lJASS](2.00 x (Real((Level of Chronosphere for (Triggering unit)))))[/lJASS] seconds".
Then in some other trigger with the event <timer name> expires unpause the units. Idk...if it's better or not but still : ))
 
Make a dummy unit with pathing collision radius 0 and place it in a non used region on your map.Then do that
Trigger:
  • Chronosphere
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • Set CS_Point = (Target point of ability being cast)
      • Set CS_Caster = (Casting unit)
      • Unit - Move Dummy &lt;gen&gt; instantly to (CS_Point)
      • Wait (2.00 x (Real((Level of Channel for (CS_Caster))))) seconds
      • Unit Group - Pick every unit in CS_Group and do (Unit - Unpause (Picked unit))
      • Unit - Move Dummy &lt;gen&gt; instantly to (&quot;unused_region&quot;)
      • Custom script: call RemoveLocation (udg_CS_Point)
      • Custom Script: call DestroyGroup(udg_CS_Group)

And that
Trigger:
  • Chronosphere
    • Events
      • Unit - A unit comes within 500.00 of Dummy &lt;gen&gt;
    • Conditions
      • (((Triggering unit) Not equal to CS_Caster) and ((((Triggering unit) is A structure) Equal to False) and (((Triggering unit) is Magic Immune) Equal to False))))
    • Actions
      • Unit Group - Add (Triggering unit) to (CS_Group)
      • Unit Group - Pick every unit in CS_Group and do (Unit - Pause (Picked unit))
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top