Post

 Resources 

Console


RE: Movement between tiles Carl (0 replies, 0 views) (2000-Jul-10)
-
I'm presuming that the problem your having is not actually moving the character smaller distances, but you can't figure out what tile the player is on/moving to. If this is the case then all you need to do is divide the MapXpos and MapYpos values by your tilesize (32), and this will give you the tile the player is on, you might want to use CInt to convert it to an integer though. Then you can just do all your usual collision checking etc. with these new values you worked out. But remember that MapXPos and MapYPos should be the position in pixels, not tiles.


-
Up One Level | Back to Forum


Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 191 visitors within the last 20 minutes
RSS News Feed