Good to see you working with your coding skills still I have to point out a few flaws that the others seemed to miss.
-Should be map ini, it's not a multiboard
-
Time - Elapsed game time is 0.00 seconds
-All variables should be prefixed.
-Base variables and multiply variables are useless, just have one variable with the whole formula instead of wasting space on useless variables (yes they are useless as you can just have one instead of two, saving space (even if it's around a few bytes))
-These should be in some kind of formula like in the cast trigger
-
-------- [1] is for the fragment to appear for the first cast --------
-
Set FragmentOffset[1] = 200.00
-
-------- [2] is for the fragment's speed --------
-
Set FragmentOffset[2] = 15.00
-Applies with the same argument as above.
-
Set UnitInRange = 150.00
-SFX variables should be two non-arrayed variables instead of one arrayed as you are only using two array slots of 8192. Arrayed variables takes more space than two normal string variables.
-Basic I found out now in the cast trigger that you have loads of these arrayed variables. Make each of them non-arrayed and make more of the non-arrayed (yet as I said above not to have multiple variables, it doesn't apply to this as these are arrayed and you don't use enough index slots to make it worth it).
-Integer A should be switched into a custom integer variable, preferably prefixed.
-The Loop seems fine, just the setunitx/y calls are disturbing me for some reason. You're moving them to a point which you already called polar offset. And then you call GetLocX/Y to get their coordinates.
So as I'm lazy to explainit all, I'll keep it simple. Polar Offset BJ looks liek this:
JASS:
function PolarProjectionBJ takes location source, real dist, real angle returns location
local real x = GetLocationX(source) + dist * Cos(angle * bj_DEGTORAD)
local real y = GetLocationY(source) + dist * Sin(angle * bj_DEGTORAD)
return Location(x, y)
endfunction
These points are those you are using:
-
Set Point[1] = (Position of Unit[1])
-
Set Point[2] = (Point[1] offset by FragmentOffset[2] towards Angles[1] degrees)
Your calls look like this:
-
Custom script: call SetUnitX(udg_Unit[1],GetLocationX(udg_Point[2]))
-
Custom script: call SetUnitY(udg_Unit[1],GetLocationY(udg_Point[2]))
And we know the BJ so let's fix this:
-
Custom script: call SetUnitX(udg_Unit[1],GetUnitX(udg_Unit[1]) + udg_FragmentOffset[2] * Cos(Angles[1] * bj_DEGTORAD))
-
Custom script: call SetUnitY(udg_Unit[1],GetUnitY(udg_Unit[1]) + udg_FragmentOffset[2] * Sin(Angles[1] * bj_DEGTORAD))
Unfortunatly you have this map check which checks the wrong point btw:
-
((Playable map area) contains Point[1]) Equal to True
Why should it check if the unit is in the map, it is before it's moved right? It's point2 you should check there.
So you probably cannot get rid of this stupid call but see this as a lesson for the future.
-No credit given to the author of the custom model?
Nice spell idea btw. Enjoy.