Extensions Object Is Below

boolean object.isBelow ( table object2 )

Test if one object's Z-position is below that of another object.

Parameters

object2 The object table of another object to test against

Return Values

boolean true if object is below object2, false otherwise

Example

-- Assume we have a table of objects indexed by ID
object1 = mmf.objects[1]
object2 = mmf.objects[2]
 
if (object1.isBelow(object2)) then
  print("object1 is on bottom!")
else
  print("object2 is on bottom!")
end

Copyright 2010 Justin Aquadro