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

How do you change the character speed?


tairapeters
 Share

Recommended Posts

> ```
>
> ' Speed moving vars
>
> Public Const WALK_SPEED As Byte = 4
>
> Public Const RUN_SPEED As Byte = 6
>
> ```
>
> Client side. Don't make it too fast or you could crash the client.

I'm not entirely certain, but don't you have to change that server-side as well?
Link to comment
Share on other sites

Nope. Right underneath that chunk of code is```

' Tile size constants

Public Const PIC_X As Long = 32

Public Const PIC_Y As Long = 32

' Sprite, item, spell size constants

Public Const SIZE_X As Long = 32

Public Const SIZE_Y As Long = 32

' ********************************************************

' * The values below must match with the server's values *

' ********************************************************

' General constants

Public Const MAX_PLAYERS As Long = 70

Public Const MAX_ITEMS As Long = 255

Public Const MAX_NPCS As Long = 255

Public Const MAX_ANIMATIONS As Long = 255

Public Const MAX_INV As Long = 35

Public Const MAX_MAP_ITEMS As Long = 255

Public Const MAX_MAP_NPCS As Long = 30

Public Const MAX_SHOPS As Long = 50

Public Const MAX_PLAYER_SPELLS As Long = 35

Public Const MAX_SPELLS As Long = 255

Public Const MAX_TRADES As Long = 30

Public Const MAX_RESOURCES As Long = 100

Public Const MAX_LEVELS As Long = 100

Public Const MAX_BANK As Long = 99

Public Const MAX_HOTBAR As Long = 12

Public Const MAX_PARTYS As Long = 35

Public Const MAX_PARTY_MEMBERS As Long = 4

Public Const MAX_PLAYER_PROJECTILES As Long = 20 ' projectiles

Public Const MAX_DOORS As Byte = 255

Public Const MAX_NPC_DROPS As Byte = 10

' NPC Spells

Public Const MAX_NPC_SPELLS As Long = 5

Public Const MAX_RES_DROPS As Byte = 10

```

I made sure before posting. Don't worry ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png) Thanks for checking though!
Link to comment
Share on other sites

Wrong wrong wrong lol

```

' Check if player is walking, and if so process moving them over

Select Case Player(Index).Moving

Case MOVING_WALKING: MovementSpeed = ((ElapsedTime / 1000) * (RUN_SPEED * SIZE_X))

Case MOVING_RUNNING: MovementSpeed = ((ElapsedTime / 2000) * (WALK_SPEED * SIZE_X))

Case Else: Exit Sub

End Select

```

The less you go down the faster your character go with the numbers after ElapsedTime/

Hope I helped ya this Dragon Eclipse
Link to comment
Share on other sites

> Wrong wrong wrong lol
>
> ```
>
> ' Check if player is walking, and if so process moving them over
>
> Select Case Player(Index).Moving
>
> Case MOVING_WALKING: MovementSpeed = ((ElapsedTime / 1000) * (RUN_SPEED * SIZE_X))
>
> Case MOVING_RUNNING: MovementSpeed = ((ElapsedTime / 2000) * (WALK_SPEED * SIZE_X))
>
> Case Else: Exit Sub
>
> End Select
>
> ```

You're kidding right? In the equation that you posted, you get the value of WALK_SPEED and RUN_SPEED. Where do you suppose you get those values? What I posted were the values of WALK_SPEED and RUN_SPEED. By changing those, you change your speed. Please read what I posted before saying something like that. What you posted works as well, but my way is not wrong.
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...