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

Auto-Run


HatakeAzzi
 Share

Recommended Posts

Well, this is my first tutorial here. I don't know if exist a tutorial about it. Anyway, go to **frmMirage** and make a **CheckBox**, set the name to chkRun.
On modGameLogic, search by Sub CheckMovement() and find it:
```
If ShiftDown Then
                        Player(MyIndex).Moving = MOVING_RUNNING
                    Else
                        Player(MyIndex).Moving = MOVING_WALKING
                    End If
```
And replace to:

```
If ShiftDown Then
                    Player(MyIndex).Moving = MOVING_RUNNING
                Else
                    Player(MyIndex).Moving = MOVING_WALKING
                If frmMirage.chkRun.Value = Checked Then
                    Player(MyIndex).Moving = MOVING_RUNNING
                Else
                    Player(MyIndex).Moving = MOVING_WALKING
                End If
                End If
```
Finish. Anything, just ask to me  :renzo:
Credits: HatakeAzzi

Excuse me for my bad english :D
Link to comment
Share on other sites

Well, you can use commandbutton to do this too… Create a commandbutton and change your name to: cmdWalkRun
Now, change the caption it to: Walking...
In the event Click of button, put this:

```
    If cmdWalkRun.Caption = "Walking..." Then
        cmdWalkRun.Caption = "Running..."
        Call AddText("Now you're running! Click again to back the walk.", BrightBlue)
    ElseIf cmdWalkRun.Caption = "Running..." Then
        cmdWalkRun.Caption = "Walking..."
        Call AddText("Now you're walking! Click again to back the run.", BrightBlue)
    End If
```
In modGameLogic find Sub CheckMovement()… then find:

```
                    If ShiftDown Then
                        Player(MyIndex).Moving = MOVING_RUNNING
                    Else
                        Player(MyIndex).Moving = MOVING_WALKING
                    End If
```
And change to:

```
                If frmMirage.cmdWalkRun.Caption = "Running..." Then
                    Player(MyIndex).Moving = MOVING_RUNNING
                ElseIf frmMirage.cmdWalkRun.Caption = "Walking..." Then
                    Player(MyIndex).Moving = MOVING_WALKING
                End If
```
I not tested this, but I think it will behave. Good Luck :)
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...