Extensions Object Is Above

boolean object.isAbove ( table object2 )

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

Parameters

object2 The object table of another object to test against

Return Values

boolean true if object is above object2, false otherwise

Example

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

Copyright 2010 Justin Aquadro