• 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.

[Trigger] Removing gui leaks

Status
Not open for further replies.
Level 10
Joined
Jan 21, 2007
Messages
576
How would i remove the Unit group leak from this trigger

  • VCast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Vengence
    • Actions
      • Set CasterVengence = (Casting unit)
      • Set L = (Position of CasterVengence)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 700.00 of L matching (((Matching unit) belongs to an enemy of (Owner of CasterVengence)) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to GroupV
      • Custom script: call RemoveLocation(udg_L)
      • Set L = (Position of CasterVengence)
      • Special Effect - Create a special effect at L using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_L)
      • Set Unit = (Random unit from GroupV)
      • Set L = (Position of Unit)
      • Unit - Move (Casting unit) instantly to L
      • Custom script: call RemoveLocation(udg_L)
      • Set L = (Position of CasterVengence)
      • Special Effect - Create a special effect at L using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_L)
      • Unit - Cause CasterVengence to damage Unit, dealing 350.00 damage of attack type Hero and damage type Death
      • Wait 0.25 seconds
      • Custom script: call DestroyGroup(GroupV)
      • Unit Group - Remove all units from GroupV
It says its leakless in leak checker but when i save it (i have jassnewgenpack) jass helper says when i do this

  • Custom script: set bj_wantDestroyGroup = true
That GroupV is a undeclared variable, so i guess my quiestion is what should i do to fix it....?
EDIT: Wow im an idiot, the problem was because i had Custom script: call DestroyGroup(GroupV) at the end, it works and is leakless now, this can be closed
 
Last edited:
Status
Not open for further replies.
Top