im having trouble finding the coordinates of some plain objects i have locked to the screen
i tried using the object position, that didnt work
i tried usint the screen position that didnt work
heres my code pls help
function click_check(x,y)
for i = 2 to 2000
if object exist(i)
if i >= 999
if x = object screen x(i) and y = object screen y(i)
print object position x(i)," ",object position y(i)
print x," ",y
print i
exitfunction i
endif
else
if (object screen x(i) > x-30) AND (object screen x(i) < x+30) AND (object screen y(i) > y-30) AND (object screen y(i) < y+30)
exitfunction i
endif
endif
endif
next i
i=0
endfunction i
edit: everything after the "else" works, as that is where it is checking for objects not locked to the screen, only having problems with i>=999 and up