I tryed it like this and it works:
maybe if you show more code, I can figure out what you are doing wrong.
SuperStrict Local tilewidth:Int = 48 Local tileheight:Int = 48 Local offsetx:Int = 0 Local offsety:Int = 0 Local cavewidth:Int = 100 Local caveheight:Int = 100 Local x:Int Local y:Int Local cavex:Int = 40 Local cavey:Int = 50 Graphics 1024,768 Repeat Cls SetColor 200,200,0 For x=0 To CaveWidth 'Draw a basic grid as a guide For y=0 To CaveHeight DrawRect (x*TileWidth)-OffsetX,(y*TileHeight)-OffsetY,TileWidth,TileHeight Next Next SetColor 0,0,0 For x=0 To CaveWidth For y=0 To CaveHeight DrawRect ((x*TileWidth)+1)-OffsetX,((y*TileHeight)+1)-OffsetY,TileWidth-1,TileHeight-1 Next Next If KeyDown(Key_Right) Then 'Move right across the map OffsetX:+4 End If If KeyDown(Key_Left) Then 'Move left across the map OffsetX:-4 End If If KeyDown(Key_Up) Then 'Move up the map OffsetY:-4 End If If KeyDown(Key_Down) Then 'Move down the map OffsetY:+4 End If SetColor 255,255,255 CaveX=Floor(MouseX()+offsetx)/48 CaveY=Floor((MouseY()+offsety)/48) DrawText cavex+" "+cavey,20,20 Flip Until KeyDown(key_escape)
maybe if you show more code, I can figure out what you are doing wrong.