• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Leaks

Status
Not open for further replies.
Level 3
Joined
May 2, 2007
Messages
43
Hello,
I downloaded This Spell earlier today, and i'm a bit worried about leaks.
i'm not so good at making triggers etc, can you spot any leaks, if so, can you tell me how to stop them?
Code:
SpecialEffects
    Events
    Conditions
    Actions
        Floating Text - Create floating text that reads ((String((Integer(agility)))) + !) above Target with Z offset 0.00, using font size 10.00, color (100.00%, 10.00%, 10.00%), and 0.00% transparency
        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
        Floating Text - Change the lifespan of (Last created floating text) to 6.00 seconds
        Special Effect - Create a special effect attached to the chest of Target using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl

Code:
Fire Slash Combo
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Dance Of Medusa 
    Actions
        Set victim = (Target unit of ability being cast)
        Set blademaster = (Casting unit)
        Unit - Pause blademaster
        Unit - Pause victim
        Unit - Turn collision for blademaster Off
        Unit - Make blademaster face victim over 0.00 seconds
        Unit - Make victim face blademaster over 0.00 seconds
        Wait 0.05 seconds
        Animation - Change blademaster's animation speed to 25.00% of its original speed
        Animation - Play blademaster's stand ready animation
        Wait 2.80 seconds
        Animation - Change blademaster's animation speed to 0.00% of its original speed
        Special Effect - Create a special effect attached to the weapon of blademaster using Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
        Set swordeffect2 = (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Destroy swordeffect2
        Wait 1.00 seconds
        Special Effect - Create a special effect attached to the weapon of blademaster using Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
        Set swordeffect = (Last created special effect)
        Animation - Change blademaster's animation speed to 300.00% of its original speed
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                Set attackpoint = ((Position of victim) offset by 150.00 towards ((Facing of blademaster) + (Random real number between -80.00 and 80.00)) degrees)
                Animation - Play blademaster's attack animation, using only Rare animations
                Wait 0.10 seconds
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Animation - Play victim's death animation
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
                Unit - Move blademaster instantly to attackpoint, facing (Position of victim)
                Wait 0.15 seconds
                Unit - Make blademaster face victim over 0.00 seconds
                Animation - Play blademaster's attack animation, using only Rare animations
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Animation - Play victim's death animation
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
                Wait 0.15 seconds
                Unit - Make blademaster face victim over 0.00 seconds
                Animation - Play blademaster's attack animation, using only Rare animations
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Animation - Play victim's death animation
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
        Unit - Move blademaster instantly to ((Position of victim) offset by 120.00 towards (Facing of victim) degrees)
        Animation - Reset victim's animation
        Unit - Make blademaster face victim over 0.00 seconds
        Animation - Change blademaster's animation speed to 50.00% of its original speed
        Animation - Play blademaster's slam animation
        Wait 1.25 seconds
        Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
        Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
        Animation - Play victim's death animation
        Wait 0.50 seconds
        Animation - Reset victim's animation
        Animation - Change blademaster's animation speed to 300.00% of its original speed
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                Set attackpoint = ((Position of victim) offset by 150.00 towards ((Facing of blademaster) + (Random real number between -60.00 and 60.00)) degrees)
                Animation - Play blademaster's attack animation, using only Rare animations
                Wait 0.10 seconds
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Animation - Play victim's death animation
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
                Unit - Move blademaster instantly to attackpoint, facing (Position of victim)
                Wait 0.15 seconds
                Unit - Make blademaster face victim over 0.00 seconds
                Animation - Play blademaster's attack animation, using only Rare animations
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Animation - Play victim's death animation
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
                Wait 0.15 seconds
                Unit - Make blademaster face victim over 0.00 seconds
                Animation - Play blademaster's attack animation, using only Rare animations
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Animation - Play victim's death animation
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
        Unit - Move blademaster instantly to ((Position of victim) offset by 120.00 towards ((Facing of victim) + 180.00) degrees)
        Animation - Reset victim's animation
        Unit - Make blademaster face victim over 0.00 seconds
        Animation - Change blademaster's animation speed to 50.00% of its original speed
        Animation - Play blademaster's slam animation
        Wait 1.25 seconds
        Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
        Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
        Animation - Play victim's death animation
        Wait 0.50 seconds
        Animation - Reset victim's animation
        Animation - Change blademaster's animation speed to 300.00% of its original speed
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                Set attackpoint = ((Position of victim) offset by 150.00 towards ((Facing of blademaster) + (Random real number between -60.00 and 60.00)) degrees)
                Animation - Play blademaster's attack animation, using only Rare animations
                Wait 0.10 seconds
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Animation - Play victim's death animation
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
                Unit - Move blademaster instantly to attackpoint, facing (Position of victim)
                Wait 0.15 seconds
                Unit - Make blademaster face victim over 0.00 seconds
                Animation - Play blademaster's attack animation, using only Rare animations
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Animation - Play victim's death animation
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
                Wait 0.15 seconds
                Unit - Make blademaster face victim over 0.00 seconds
                Animation - Play blademaster's attack animation, using only Rare animations
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
                Animation - Play victim's death animation
                Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
        Unit - Move blademaster instantly to ((Position of victim) offset by 120.00 towards (Facing of victim) degrees)
        Unit - Make blademaster face victim over 0.00 seconds
        Animation - Change blademaster's animation speed to 30.00% of its original speed
        Animation - Play blademaster's slam animation
        Animation - Reset victim's animation
        Wait 2.60 seconds
        Unit - Cause blademaster to damage victim, dealing 750.00 damage of attack type Hero and damage type Normal
        Special Effect - Create a special effect at (Position of victim) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
        Special Effect - Create a special effect at (Position of victim) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
        Special Effect - Create a special effect at ((Position of victim) offset by 100.00 towards 0.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
        Special Effect - Create a special effect at ((Position of victim) offset by 50.00 towards 45.00 degrees) using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
        Special Effect - Create a special effect at ((Position of victim) offset by 100.00 towards 90.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
        Special Effect - Create a special effect at ((Position of victim) offset by 50.00 towards 315.00 degrees) using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
        Special Effect - Create a special effect at ((Position of victim) offset by 100.00 towards 180.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
        Special Effect - Create a special effect at ((Position of victim) offset by 50.00 towards 225.00 degrees) using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
        Special Effect - Create a special effect at ((Position of victim) offset by 100.00 towards 270.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
        Special Effect - Create a special effect at ((Position of victim) offset by 50.00 towards 135.00 degrees) using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
        Special Effect - Destroy swordeffect
        Wait 0.10 seconds
        Unit - Make blademaster face (Facing of victim) over 0.00 seconds
        Animation - Change blademaster's animation speed to 1000.00% of its original speed
        Animation - Play blademaster's stand ready animation
        Wait 0.07 seconds
        Animation - Change blademaster's animation speed to 0.00% of its original speed
        Wait 0.03 seconds
        Unit - Move blademaster instantly to ((Position of victim) offset by 500.00 towards (Facing of victim) degrees)
        Wait 0.05 seconds
        Special Effect - Create a special effect at (Position of blademaster) using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
        Wait 0.40 seconds
        Special Effect - Create a special effect attached to the weapon of blademaster using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
        Wait 0.20 seconds
        Animation - Change blademaster's animation speed to 100.00% of its original speed
        Animation - Reset blademaster's animation
        Unit - Unpause blademaster
        Unit - Unpause victim
        Unit - Turn collision for blademaster On
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Oh. My. God.

You found yourself a leaky spell there, my friend :p

You have to destroy every single one of those Position of victims and those Special Effects.

The latter is easy, Destroy (Last Created Special Effect) after each effect.

The former, make a Point variable called loc, and another called loc2. Now...

set loc = somewhere (eg Position of Victim)

Create a special effect at loc

Custom script: call RemoveLocation( udg_loc )

Next, if you have any locations that need to be based off a location, use loc2.

Eg.

loc = Position of Victim
loc2 = loc offset by 100,100
Create a special effect at loc2
Custom script: call RemoveLocation( udg_loc )
Custom script: call RemoveLocation( udg_loc2 )
 
Level 3
Joined
May 2, 2007
Messages
43
Argh! ok, gonna try to stop the leaks, thanks for pointing them out.
Oh, and nice tool, will be helpful.
 
Status
Not open for further replies.
Top