I made a function to check collision beetween 2 8x8 locations (sprites) using tables.
For some reason, it says that item2 (not item1, that ones ok) is a nil value when i use it.
Any ideas?
-- collision --
function coll(item1,item2)
rx=abs(item1.x-item2.x)
ry=abs(item1.y-item2.y)
if rx < 9 and ry < 9 then
return true
else
return false
end
end
P#129707 2023-05-14 06:40
[Please log in to post a comment]