02-09-2006, 05:46 PM
Okay, then add this code, somewhere in gameloop:
This will make it stop scrolling, if there is no map linked in any direction.
Code:
If Map.Up = 0 Then
If MapYOffset > 0 Or (MapYOffset = 0 And GetPlayerDir(MyIndex) = DIR_DOWN) Then
MapYOffset = 0
PYOffset = 32
End If
End If
If Map.Down = 0 Then
If MapYOffset < 0 Or (MapYOffset = 0 And GetPlayerDir(MyIndex) = DIR_UP) Then
MapYOffset = 0
PYOffset = 32
End If
End If
If Map.Left = 0 Then
If MapXOffset > 0 Or (MapXOffset = 0 And GetPlayerDir(MyIndex) = DIR_RIGHT) Then
MapXOffset = 0
PXOffset = 32
End If
End If
If Map.Right = 0 Then
If MapXOffset < 0 Or (MapXOffset = 0 And GetPlayerDir(MyIndex) = DIR_LEFT) Then
MapXOffset = 0
PXOffset = 32
End If
End If
This will make it stop scrolling, if there is no map linked in any direction.