Death Grip
There are a few calculations that could be improved to anticipate various changes to a unit's 3D position throughout the game. If the target unit is hovering then it should not be pulled to the ground and then lifted towards the caster. I would also recommend using some kind of prevention mechanism to stop the spell from being casted on the same unit twice.
It would be outstanding if you could weight multiple casts on the same unit such that if two casters were on the opposite sides of the target then the target would be elevated but not actually move in any particular way, or for 2+ instances on the same target for that matter.
- There's a glitch when the unit is being pulled by a caster that is on a different cliff-level, it seems to be a result of buggy height-control. Here's a screen-shot:
The peasant was pulled from two levels down, and was pulled to an awkward height and ultimately placed in the cliff. Even if you perhaps want this type of functionality you should still fix the height problems.
I think this has something to do with it:
-
Set DG_RealTimer[DG_Integer[3]] = (DG_RealTimer[DG_Integer[3]] + (180.00 / (DG_DistanceTotal[DG_Integer[3]] /
-
DG_Speed[DG_Integer[3]])))
-
Set DG_High[DG_Integer[3]] = ((Sin(DG_RealTimer[DG_Integer[3]])) x DG_HighSettings[DG_Integer[3]])
-
Animation - Change DG_Target[DG_Integer[3]] flying height to DG_High[DG_Integer[3]] at 0.00
I don't see anywhere here where you anticipate any change in height. I think it would be an improvement among other things if you were to implement some sort of calculation that incorporates the height difference.
- Why do you use "DG_Integer[3]" as your loop index? There is no reason to have to refer to an array each time you want to reference this value when you could just as easily use "bj_forLoopAIndex" or the "For Loop Integer A" as it is named in GUI.
- You fail to reset the fly-height of the target unit once it is no longer used. If you've got a unit that hovers (or a flying unit, but I see you've unchecked it in the available targets) it will not reset the fly-height and the hovering unit will be permanently lower to the ground (or until something else resets its fly-height).
- I know that the available targets does not include Flying units, but I think it would be beneficial to the spell if you allowed the user to determine this, and included functionality for these situations in your calculations.
- The values for "Cast Backswing" and "Cast Point" are not 0.00 in your "Dummy Stun" caster unit. This causes the stun to be slightly delayed after the target unit has already been pulled to the caster.
In addition to this, the *speed* of your "Stun" ability is set to 10000, though setting it to 0 will yield an spell that instantly applies the effect to the target.
When you deduct from "DG_DistanceLeft" you need to check "immediately" whether or not the distance is less than 0. If it is, then create your dummy unit
there and issue it to stun the target so that there is absolutely no delay in between when the target reaches its destination and when it is stunned.
If you apply all the details I've mentioned above you can also replace the expiration timer on the dummy-caster with a "Unit - Remove" call and just remove it immediately.