- Joined
- Dec 19, 2012
- Messages
- 411
I got a quick question regarding
A sample trigger :
Lets assume item is pre-placed at point A. When unit pick it up, and drop it at point B, both GetItemX/Y will returns the x/y coordinates of point A, when pick up and drop it again at point C, GetItemX/Y will returns the x/y coordinates of point B, and so on... For different items, GetItemX/Y seems will returns corresponding point values depend on the previous position of items. I wonder, is this a bug?
GetItemX()
andGetItemY()
A sample trigger :
JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
local real x = GetItemX(GetManipulatedItem())
local real y = GetItemY(GetManipulatedItem())
call AddSpecialEffect("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilMissile.mdl", x, y)
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
call TriggerRegisterAnyUnitEventBJ(gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_DROP_ITEM)
endfunction