I need Z curve motion not X/Y Rmx.
And i need it to be functional.
Make a 2d grade equation and change x to z and y to x.
then make a loop with a small wait increasing the z value eaxh step.
It's a bit hard to explain, but let's say we use x=-p/2+-√(p/2)² -q
then we can make a dummy unit with the former x value as flying height, and use y as x.
So lets say we have the equation y = x² -6x -5.
when the trigger runs a dummy missile is created and a loop started, and every 0.10 sec the units flying height is changed to the input x value wich increases every time the loop passes. the first x point (the x-q(wich is 5) should be the height from where the missile is shot.
Or well.. you would also like to find the vertex's relation to the lower x value, and when i think of it, this might be a little tricky. Still worh a try.
EDIT: I would still go for a function where y is in relation to x/distance between origin and target.
Ir order to make the dummy missile hit, you use something like this:
Code:
function doDamage takes unit u, unit caster, real dmg returns nothing
local location loc = GetUnitLoc(u)
local group g = CreateGroup()
local unit temp
loop
exitwhen IsUnitAliveBJ(missile) == false
call RemoveLocation(loc)
set loc = GetUnitLoc(u)
call GroupEnumUnitsInRangeOfLoc(g, loc, 80., null)
set temp = FirstOfGroup(g)
call DamageUnit(GetOwningPlayer(caster), dmg, u)
call GroupRemoveUnit(g, temp)
call TriggerSleepAction(0.10)
endloop
call DestroyGroup(g)
set g = null
call RemoveLocation(loc)
set loc = null
set temp = null
endfunction
I'm not expecting you to use this in specific, i just copied and slightly changed a code i use for another feature, this actually damages everything that comes in contact with the missile. You would do better making your own.