View Single Post
  #2  
Old 06-26-2013, 05:31 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by baseman101 View Post
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.temp.pl.64;
temp.temp.pl.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.
__________________
Reply With Quote