I hope that I can do requests in this section. In fact, I need a function which would return the destination of current order of triggering unit. There is in GUI a function, but it only works on event response. My trigger has begins casting an ability event and other events would ruin it. I cannot find a way in GUI, maybe someone will know how to do in JASS.
I short: Point var = target point of current order of Unit
(var is output variable of function, types begin with capital letters).
the best part is, though GUI < JASS, JASS is NOT > Life.
JASS cant do everything
the only way to do this ( as far as i know ) is just as easy to do in GUI, you just store the current order x/y ( or point ) in a variable, and return that when you need it.
You have to create a local trigger in the trigger that has 'Event - Spell Effect'. The local trigger's event should be EVENT_UNIT_ISSUED_POINT_ORDER. All you have to do is to store those points (better to store them as corditates). A piece of the whole trigger:
function Trig_Unit_Ordered_Actions takes nothing returns nothing
set udg_OrderX = GetOrderPointX()
set udg_OrderY = GetOrderPointY()
endfunction
function Trig_Spell_Effect_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local trigger t = CreateTrigger()
call TriggerRegisterUnitEvent(t, u, EVENT_UNIT_ISSUED_POINT_ORDER)
call TriggerAddAction(t, function Trig_Unit_Ordered_Actions)
endfunction