JASS:
function CollisionDetectionUnitGround takes item i, real xfo, real yfo returns boolean
local real x
local real y
call SetItemPosition(i,xfo,yfo)
set x=GetItemX(i)
set y=GetItemY(i)
call RemoveItem(i)
if xfo==x and yfo==y then
call DisplayTextToForce(GetPlayersAll(),"WORKS")
return true
else
call DisplayTextToForce(GetPlayersAll(),"FAIL")
endif
return false
endfunction
JASS:
function testingblock takes nothing returns nothing
local real x=GetUnitX(udg_mt)
local real y=GetUnitY(udg_mt)
local item i= CreateItem('afac',1,1)//not finished; will use hashtable instead of call RemoveItem(i)
if CollisionDetectionUnitGround(i,x,y)==true then
do something
endif
set i=null
endfunction
Example. The use of the functions themselves is irrelevant here.
What I am asking is:
do I need to set i=null in CollisionDetectionUnitGround()?
Last edited:
