• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Remove Leaks

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,610
Hey there once again!

I have been making my campaign for over half year now. I have already released alpha tests from it. I have a trigger that leaks. I want it to be leakless. The one who fixis leaks I will give honor here, and credits at the campaign. Thank you beforehand.

Here is the trigger:

  • AAAAOOOOOOOEEEEEE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blizzard
    • Actions
      • Unit Group - Pick every unit in (Units within 5000.00 of (Center of (Playable map area)) matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is in (Units owned by Neutral Hostile)) Equal to True) and (((Matching unit) has buff Invulnerable) Equal to False)))) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Casting unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
          • Special Effect - Destroy (Last created special effect)
However, I have attach the map into this post. Please fix the triggers in that map and put it to this thread when there are no more leaks. Please remember use GUI, I'm not good with JASS.
 

Attachments

  • AAAAOOOOOOOEEEEEE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blizzard
    • Actions
      • Set TempLoc = Center of (Playable map area)
      • Set TempGroup = Units within 5000.00 of TempLoc matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is in (Units owned by Neutral Hostile)) Equal to True) and (((Matching unit) has buff Invulnerable) Equal to False))))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering Unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
          • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call DestroyGroup(udg_TempGroup)
here. no leaks
EDIT: fixed the point variable
 
ady_illidan said:
now i'm sure. I have used 2 unit groups and 1 point variable.
Okay, nice work man. +rep + credits given

But still, I have to be 100% sure this won't leak, can someone else still check if this leaks?

It's like this now:

  • AAAAOOOOOOOEEEEEE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blizzard
    • Actions
      • Set TempLoc = (Center of (Playable map area))
      • Set TempGroup2 = (Units owned by Neutral Hostile)
      • Set TempGroup = (Units within 5000.00 of TempLoc matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is in TempGroup2) Equal to True) and (((Matching unit) has buff Divine Shield) Equal to False))))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
          • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call DestroyGroup(udg_TempGroup2)
      • Custom script: call DestroyGroup(udg_TempGroup)
 
Yeah, points do leak.
@ Flame_Phoenix No need to null the global variables ;)

TempGroup2 is unnecessary(and its destruction).
Instead of that and the condition that checks if the unit is in there, just check that owner of matching unit is neutral hostile.

Anyway, now it does not leak.
 
Status
Not open for further replies.
Back
Top