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

[EO2]Diagonal walking


Sunku
 Share

Recommended Posts

Well you could try this, but it's off the top of my head, and you'd have to make sprites/ change the source to make it display the sprites for walking diagonal.  Search your Client for 'Move left, it should be in ModInput.  In between End If and ' Error handler add this:

```
    ' Move Up/Left
    If GetKeyState(vbKeyUp) And GetKeyState(vbKeyLeft) < 0 Then
        DirUp = True
        DirDown = False
        DirLeft = True
        DirRight = False
        Exit Sub
    Else
        DirUp = False And DirLeft = False
    End If

    ' Move Up/Right
    If GetKeyState(vbKeyUp) And GetKeyState(vbKeyRight) < 0 Then
        DirUp = True
        DirDown = False
        DirLeft = False
        DirRight = True
        Exit Sub
    Else
        DirUp = False And DirRight = False
    End If

    ' Move Down/Left
    If GetKeyState(vbKeyDown) And GetKeyState(vbKeyLeft) < 0 Then
        DirUp = False
        DirDown = True
        DirLeft = True
        DirRight = False
        Exit Sub
    Else
        DirDown = False And DirLeft = False
    End If

    ' Move Down/Right
    If GetKeyState(vbKeyDown) And GetKeyState(vbKeyRight) < 0 Then
        DirUp = False
        DirDown = True
        DirLeft = False
        DirRight = True
        Exit Sub
    Else
        DirDown = False And DirLeft = False
    End If
```
I tested it.  It doesn't work, but it's a start.
Link to comment
Share on other sites

if you really think hard about it there would be a LOT work and "Extra work" that goes with this. I was trying to go over what was needed, and beleive me, its alot. It me it dosnt seem like its worth it to all this to a game. you'd have to rewrite EVERY movement sub in the entire game, and people using doors, well… they would be screwed without a seperate set of instruction on how to add it.

=P just my opinion that its not worth it.
Link to comment
Share on other sites

@RyokuHasu:

> if you really think hard about it there would be a LOT work and "Extra work" that goes with this. I was trying to go over what was needed, and beleive me, its alot. It me it dosnt seem like its worth it to all this to a game. you'd have to rewrite EVERY movement sub in the entire game, and people using doors, well… they would be screwed without a seperate set of instruction on how to add it.
>
> =P just my opinion that its not worth it.
Link to comment
Share on other sites

@Darth:

> Well you could try this, but it's off the top of my head, and you'd have to make sprites/ change the source to make it display the sprites for walking diagonal.  Search your Client for 'Move left, it should be in ModInput.  In between End If and ' Error handler add this:
>
> ```
>     ' Move Up/Left
>     If GetKeyState(vbKeyUp) And GetKeyState(vbKeyLeft) < 0 Then
>         DirUp = True
>         DirDown = False
>         DirLeft = True
>         DirRight = False
>         Exit Sub
>     Else
>         DirUp = False And DirLeft = False
>     End If
>    
>     ' Move Up/Right
>     If GetKeyState(vbKeyUp) And GetKeyState(vbKeyRight) < 0 Then
>         DirUp = True
>         DirDown = False
>         DirLeft = False
>         DirRight = True
>         Exit Sub
>     Else
>         DirUp = False And DirRight = False
>     End If
>    
>     ' Move Down/Left
>     If GetKeyState(vbKeyDown) And GetKeyState(vbKeyLeft) < 0 Then
>         DirUp = False
>         DirDown = True
>         DirLeft = True
>         DirRight = False
>         Exit Sub
>     Else
>         DirDown = False And DirLeft = False
>     End If
>    
>     ' Move Down/Right
>     If GetKeyState(vbKeyDown) And GetKeyState(vbKeyRight) < 0 Then
>         DirUp = False
>         DirDown = True
>         DirLeft = False
>         DirRight = True
>         Exit Sub
>     Else
>         DirDown = False And DirLeft = False
>     End If
> ```
> I tested it.  It doesn't work, but it's a start.

Go to the code that actually checks the direction and alters the players coordinates. Add in extra checks,

If Dir_UP and Dir_RIGHT then
setplayerx(index, Getplayerx(index) + 1
setplayery(index, Getplayery(index) - 1
end if
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...