• 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.

GetItemX/Y

Status
Not open for further replies.
Level 11
Joined
Dec 19, 2012
Messages
411
I got a quick question regarding 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
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?
 
Status
Not open for further replies.
Top