Again I've got to critisize some things: Bsically what has been said at Water Bolt Fury and Grab and Throw. You again have the duration > 0 and then Duration <= 0 which I already mentionend at another spell.
Further things:
-We have an undeclared variable (point_C) and you use the wrong array number at intiger (2 instead of 1).
-
Set Unit_G = (Units within 465.0 of point_C[intiger[2]])
Then again you use the wrong array number, through which the locations aren't removed properly and therefore leak:
-
Custom Script - call RemoveLocation (udg_Point_A[udg_intiger[2]])
-
Custom Script - call RemoveLocation (udg_Point_B[udg_intiger[2]])
-You create a special effect, which is never destroyed and which leaks since you refer to the position of a unit
-
Special Effect - Create a special effect at (Position of unit_D[intiger[2]]) using (....)
-Let's go over to the run trigger: Here we have again a leak, and another leak, since you never destroy that group....:
-
Set UnitG[intiger[2]] = (Units within 100.00 of (Position of Unit_D[intiger[2]]))
-Next line we have an undeclared variable again + this variable is never used Oo:
-
Set unit_T[intiger[2]] = (Position of Unit_P[intiger[2]])
Then you set a completely unneccesary variable (Unit_P)
-
Set Unit_P = (Picked Unit)
-
Unit - Cause (....) to damage Unit_P (....)
You could as well just use the following:
-
Unit - Cause (....) to damage (Picked Unit) (....)
-Again you leak with a special effect:
-
Special Effect - Create a Special Effect at (Position of unit_D[intiger[2]]) (....)
-Lateron you remove Point_B and Point_C, which are never used in this trigger and Point_B is already removed at the init trigger.
-After resetting the intEgers, you use:
-
Set Unit_P[intiger[2]] = No Unit
First, this is not needed, since it is overwritten every 0.10 seconds anyway, when you define the group new, and second: This will only remove the unit, if it is the last instance of the spell.
-
And one last hing in the init trigger: You set the angle as a variable, which is never used....
All in all nice idea, not too original, but triggering is lacking....
PS: @Kingz
Why not simply use:
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Random integer number between 1 and 4) equals (==) 4
-
Then - Actions
-
Special effect - create...
-
Special effect - destroy..
-
Else - Actions
Again sry for not using the trigger function not right :/
EDIT: Found the angle variable