First find:
Public Const RUN_SPEED = 8
Add below:
Public Const ADMIN_WALK = 8 Public Const ADMIN_RUN = 16
Then find:
If Player(Index).Moving = MOVING_RUNNING Then Select Case GetPlayerDir(Index) Case DIR_UP Player(Index).YOffset = Player(Index).YOffset - RUN_SPEED Case DIR_DOWN Player(Index).YOffset = Player(Index).YOffset + RUN_SPEED Case DIR_LEFT Player(Index).XOffset = Player(Index).XOffset - RUN_SPEED Case DIR_RIGHT Player(Index).XOffset = Player(Index).XOffset + RUN_SPEED End Select End If
And replace with:
Sub ProcessMovement(ByVal Index As Long) ' Check if player is walking, and if so process moving them over If Player(Index).Moving = MOVING_WALKING Then If GetPlayerName(Index) = "URPLAYERNAMEHERE" Then Select Case GetPlayerDir(Index) Case DIR_UP Player(Index).YOffset = Player(Index).YOffset - ADMIN_WALK Case DIR_DOWN Player(Index).YOffset = Player(Index).YOffset + ADMIN_WALK Case DIR_LEFT Player(Index).XOffset = Player(Index).XOffset - ADMIN_WALK Case DIR_RIGHT Player(Index).XOffset = Player(Index).XOffset + ADMIN_WALK End Select Else Select Case GetPlayerDir(Index) Case DIR_UP Player(Index).YOffset = Player(Index).YOffset - WALK_SPEED Case DIR_DOWN Player(Index).YOffset = Player(Index).YOffset + WALK_SPEED Case DIR_LEFT Player(Index).XOffset = Player(Index).XOffset - WALK_SPEED Case DIR_RIGHT Player(Index).XOffset = Player(Index).XOffset + WALK_SPEED End Select End If ' Check if completed walking over to the next tile If (Player(Index).XOffset = 0) And (Player(Index).YOffset = 0) Then Player(Index).Moving = 0 End If End If
' Check if player is running, and if so process moving them over If Player(Index).Moving = MOVING_RUNNING Then If GetPlayerName(Index) = "CyberBoy" Then Select Case GetPlayerDir(Index) Case DIR_UP Player(Index).YOffset = Player(Index).YOffset - ADMIN_RUN Case DIR_DOWN Player(Index).YOffset = Player(Index).YOffset + ADMIN_RUN Case DIR_LEFT Player(Index).XOffset = Player(Index).XOffset - ADMIN_RUN Case DIR_RIGHT Player(Index).XOffset = Player(Index).XOffset + ADMIN_RUN End Select Else Select Case GetPlayerDir(Index) Case DIR_UP Player(Index).YOffset = Player(Index).YOffset - RUN_SPEED Case DIR_DOWN Player(Index).YOffset = Player(Index).YOffset + RUN_SPEED Case DIR_LEFT Player(Index).XOffset = Player(Index).XOffset - RUN_SPEED Case DIR_RIGHT Player(Index).XOffset = Player(Index).XOffset + RUN_SPEED End Select End If ' Check if completed walking over to the next tile If (Player(Index).XOffset = 0) And (Player(Index).YOffset = 0) Then Player(Index).Moving = 0 End If End If End Sub
|