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

Wasd support with enter chat help.


kanechart
 Share

Recommended Posts

So I added wasd and enter to chat so enter hey enter like all games ;)

Anyways a bug I found and its major. If you hit ctrl or shift or any function while in chat it will repeat them none stop once your out. So your always moving fast and always attacking.

```
  If (KeyAscii = vbKeyReturn) Then
        frmMirage.txtMyTextBox.Text = vbNullString
        If Player(MyIndex).Y - 1 > -1 Then
            If Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex) - 1).Type = TILE_TYPE_SIGN And Player(MyIndex).Dir = DIR_UP Then
                Call AddText("The Sign Reads:", BLACK)
                If Trim$(Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex) - 1).String1) <> vbNullString Then
                    Call AddText(Trim$(Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex) - 1).String1), GREY)
                End If
                If Trim$(Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex) - 1).String2) <> vbNullString Then
                    Call AddText(Trim$(Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex) - 1).String2), GREY)
                End If
                If Trim$(Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex) - 1).String3) <> vbNullString Then
                    Call AddText(Trim$(Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex) - 1).String3), GREY)
                End If
                Exit Sub
            Else
                Call CheckMapGetItem
                If Map(GetPlayerMap(MyIndex)).Tile(GetPlayerX(MyIndex), GetPlayerY(MyIndex)).Type <> TILE_TYPE_ITEM Then
                If frmMirage.txtMyTextBox.Visible = False Then
                    frmMirage.txtMyTextBox.Visible = True
                    frmMirage.txtMyTextBox.SetFocus
                Else
                    frmMirage.picScreen.SetFocus
                    frmMirage.txtMyTextBox.Visible = False
                End If
                End If

            End If
        End If
```
Link to comment
Share on other sites

@defendersdef:

> try to end if push ctrl or shift. sorry, dont know how 2 script, lol :lipsrsealed:

That is exactly what I was thinking too not sure how to end it though hmm. I will check other functions maybe copy it from that ;)

I tried            Player(MyIndex).Attacking = 0

But it does not work well it does if you hold down return or use it for a second. it's almost like thinks control button is being held down but if i try to use ctrl up and down still does nothng keeps attacking.
Link to comment
Share on other sites

In the Client Source, go to modGameLogic and search for
```
' Check to make sure they aren't trying to auto do anything
```
Then make sure you have
```
                If GetAsyncKeyState(vbKeyUp) >= 0 And DirUp Then
                    DirUp = False
                End If
                If GetAsyncKeyState(vbKeyDown) >= 0 And DirDown Then
                    DirDown = False
                End If
                If GetAsyncKeyState(vbKeyLeft) >= 0 And DirLeft Then
                    DirLeft = False
                End If
                If GetAsyncKeyState(vbKeyRight) >= 0 And DirRight Then
                    DirRight = False
                End If
                If GetAsyncKeyState(VK_CONTROL) >= 0 And ControlDown Then
                    ControlDown = False
                End If
                If GetAsyncKeyState(VK_SHIFT) >= 0 And ShiftDown Then
                    ShiftDown = False
                End If
```
Under it.
If that doesn't fix it ill look again,
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...