The IFs are to check where it is. With four IFs, you can check if a point is in a box by using >= <= . This might be a little too complicated, so here's an example. IF X >= 0 THEN IF X <= 0 + 32 THEN IF Y >= 208 THEN IF Y <= 208 + 32 THEN Yep! The point is inside a box in the lower-left corner! RETURN TRUE endifs... lol RETURN FALSE END