Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Equipable Item that increases movement speed?


Xtrea
 Share

Recommended Posts

I created a variable called MoveSpeed in the ItemRec for both client and server and edited my processMovement sub like this. ```
Sub ProcessMovement(ByVal Index As Long)
Dim MovementSpeed As Long
Dim MountSpeed As Long
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    ' Check if player is walking, and if so process moving them over
    If GetPlayerEquipment(Index, Shield) > 0 Then
        MountSpeed = Item(GetPlayerEquipment(Index, Shield)).MoveSpeed
    End If
    Select Case Player(Index).Moving
        Case MOVING_WALKING: MovementSpeed = ((ElapsedTime / 1000) * ((RUN_SPEED + MountSpeed) * SIZE_X))
        Case MOVING_RUNNING: MovementSpeed = ((ElapsedTime / 1000) * ((WALK_SPEED + MountSpeed) * SIZE_X))
        Case Else: Exit Sub
    End Select

```
In the above case, I initialized a new variable called MountSpeed and had it based off of a variable within the shield item type called MoveSpeed.  There's other stuff within the processMovement sub, this is just the beginning.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...