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

Script Not Working (SOLVED)


Kimimaru
 Share

Recommended Posts

Hey! I'm attempting to change the walking and running speeds of different classes, and it's apparently not working. I have this in my **Sub JoinGame(Index)**:

```
' Changes player run speeds based on class

    If GetPlayerClass(Index) = 1 Then
Call SetSpeed(Index, Run, 7)
    End If

    If GetPlayerClass(Index) = 2 Then
Call SetSpeed(Index, Walk, 2)
Call SetSpeed(Index, Run, 5)
    End If

    If GetPlayerClass(Index) = 3 Then
Call SetSpeed(Index, Walk, 3)
Call SetSpeed(Index, Run, 6)
    End If

    If GetPlayerClass(Index) = 4 Then
Call SetSpeed(Index, Walk, 3)
Call SetSpeed(Index, Run, 7)
    End If

    If GetPlayerClass(Index) = 5 Then
Call SetSpeed(Index, Walk, 2)
Call SetSpeed(Index, Run, 4)
    End If
```
I've even tried it with more drastic numbers, such as 20, but the class' speed still seems to remain the same. Any help would be greatly appreciated.
Link to comment
Share on other sites

Each increase (4-8, 8-16) is doubling speed, so yeah, it's pretty significant.  I used speed increases/decreases for consumable items and short-duration spells on my game, since I don't see it being very fair to give some people a permanent significant speed advantage.

Other uses for speed could be special tiles/terrain (slow going on rough ground/tall grass, maybe antigrav fields that make you move really fast) or maybe as a gimmick in a special boss fight or something.  There's plenty of uses for it, if you're creative.  It'd be cool to have players that were slightly faster or slower than other players but not in a significant way, but that'd require source editing.
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...