ok man, i'm gonna help you.
Just to let you know i'm doing this because your a newby on this.
Also i'm not a fan of GUI
Anyway... I'm not gonna send you a link at the tutorials because the tutorials SUCK man.
No offense to the hive just those long boring tutorials don't make any sense to new users.
Removing Leaks:
Here's what leaks in your spell:
-
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
Position of Target Unit of Ability being cast leaks.
When you want to point at a position in any trigger action you have to set a variable for it.
You also use WAITS which make it non-mui. But i'm gonna go through the leak clear up first.
Like this
-
Set TempPoint = Position of (Target unit of ability being cast)
then you do:
-
Special Effect - Create a special effect at (TempPoint) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
and just after that we want to destroy the effect we made, it leaks thats why.
Do this after that:
-
Special Effect - Destroy (Last created special effect)
if you wanna destroy the effect later you gotta set avariable for it and then destroy it via the variable. For safety issues.
Next: This leaks as well
-
Unit - Move (Target unit of ability being cast) instantly to ((Position of (Triggering unit)) offset by 450.00 towards (Random real number between 0.00 and 360.00) degrees)
Position of Triggering unit again, but this time we use a polar offset.
We need another point variable.
We already got TempPoint and we won't remove it yet betcause we're gonna use it.
We do this.
-
Set Point2 = (TempPoint) offset by 450.00 towards (Random real numbet between 0.00 and 360.00) degrees
and after that:
-
Unit - Move (Target unit of ability being cast) instantly to (Point2)
And now we must remove the leaks of the points by calling a custom script since GUI doesn't give us an action to remove locations..
-
Custom script: call RemoveLocation(udg_TempPoint)
-
Custom script: call RemoveLocation(udg_Point2)
voila leaks cleared
Also remember, when you call a custom script, you call a jass function/method.
GUI Global variables always have a prefix called "udg_" before a variable.
That means every time you create a variable, it's declared as udg_variable.
Good Luck
/PS/
i want a cookie for my help!
