Quote:
Originally Posted by baseman101
Sorry, I wasn't clarifying myself. I meant the x and y coordinates of the level part.
|
Just take the player's x and y mod 64 (the width/height of a level):
PHP Code:
temp.x = temp.pl.x % 64;
temp.y = temp.pl.y % 64;
% is the modulo operator (the remainder of division).
This will give you the player's x/y relative to the top-left of their current level, rather than the top-left of the entire GMAP.