• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Request

Status
Not open for further replies.
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).

I hope I was clear
 
Level 11
Joined
Jul 12, 2005
Messages
764
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:
JASS:
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
 
Status
Not open for further replies.
Top