Log In  


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



always assume pico8 errors are valid - eg item2 is nil.
we are missing the full code to help here...


Could be, ill post the full code in another post. Please do note that i had only full access to pico 8 from yesterday. Summary, im a noob :P




[Please log in to post a comment]