• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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