Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprint on without re-press *w and force Sprint key up #1

Open
Artin0123 opened this issue Jul 30, 2024 · 0 comments
Open

Sprint on without re-press *w and force Sprint key up #1

Artin0123 opened this issue Jul 30, 2024 · 0 comments

Comments

@Artin0123
Copy link

Artin0123 commented Jul 30, 2024

An example (I don't use gui and other stuff so I removed them):

ToggleSprint:
    if (Sprinting = "false") {
        global Sprinting = "true"
        if (GetKeyState("w", "P")) {
            Send, {%MinecraftSprintKey% down}
        }
    } else {
        global Sprinting = "false"
        Send, {%MinecraftSprintKey% up}
    }
Return

*w::
    if (Sprinting = "true") {
        Send, {%MinecraftSprintKey% down}
    }
    Send, {w down}
    
    KeyWait, w
    
    Send, {%MinecraftSprintKey% up}
    Send, {w up}
Return

force Sprint key up is needed because bedrock open menu will clear key behavior but the key still pressed

@Artin0123 Artin0123 changed the title Sprint on without re-press *w and force Sprint key up Sprint on without re-press *w Jul 30, 2024
@Artin0123 Artin0123 changed the title Sprint on without re-press *w Sprint on without re-press *w and force Sprint key up Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant