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

Help cleaning leaks.

Status
Not open for further replies.
Level 7
Joined
Nov 13, 2007
Messages
244
Well this spell worked for a while but then It just stopped working I believe leaks are the problem well anyways here is the spell.
  • Sakuras Fury Level 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sakura's Fury
      • (Level of Sakura's Fury for cha_unit[1]) Equal to 1
    • Actions
      • Set cha_unit[1] = (Casting unit)
      • Special Effect - Create a special effect at (Position of cha_unit[1]) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Environment - Create a 2.00 second Depression ripple deformation at (Position of cha_unit[1]) with starting radius 500.00, ending radius 500.00, and depth 100.00, using 1.00 second ripples spaced 512.00 apart
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Unit - Create 1 sakuras_fury_dummy_level_1 for (Owner of cha_unit[1]) at (Position of cha_unit[1]) facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Attack Ground ((Position of cha_unit[1]) offset by (Random real number between 500.00 and 600.00) towards ((Real((Integer A))) x (Random real number between 40.00 and 50.00)) degrees)
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
(Level of Sakura's Fury for cha_unit[1]) Equal to 1
This is your problem. You use cha_unit[1] before you assaign it any value.
You leak only one thing - the special effect.
In this case, you can Destroy it immediately like:
Special Effect - Destroy Effect ( Create a special effect at (Position of cha_unit[1]) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl)
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Oh, and you leak the ripple effect too.
But that would be harder to destroy, since you would want it to last the whole 4 seconds.
 
Status
Not open for further replies.
Top