Hello
How do I make it so that you got to hold down a key to do a certain action?
Like hold the SHIFT key, then press UP to look up, or press RIGHT to look right.
Help please.
Thanks!
Don't know if this works, but have the SHIFT key set a variable to 7, then run a loop and use conditional branches to constantly check if that variable is 7. Then, within the branch, have more key inputs for up, down, whatever.
Quote from: slashphoenix on March 03, 2009, 11:35:11 PM
Don't know if this works, but have the SHIFT key set a variable to 7, then run a loop and use conditional branches to constantly check if that variable is 7. Then, within the branch, have more key inputs for up, down, whatever.
Sorry, tried that.
Thanks for replying though! XD
You'll have to tweak this to meet your needs, but this is the gist of it.
:Loop
:Variable Operation: Set [BUTTON PRESS] to 0
:Wait 0.1 Seconds
:Key Input to [BUTTON PRESS]
:Branch if Var [BUTTON PRESS] is 1 or more
:Branch if Switch [PAUSE] is OFF
:Switch Operation [PAUSE] ON
:Variable Operation: Set [BUTTON PRESS] to 0
:Wait 0.1 Seconds
:Key Input to [BUTTON PRESS]
:End
:Jump to Label 1
:End
:Key Input to [BUTTON PRESS]
:Switch Operation [PAUSE] ON
:Label 1
REST OF YOUR CODE
The wait times above are completely arbitrary, but generally make the system run smoother. Now, all this little script does is check if a button is held down. It'll take work on your part to integrate into your system. You want to check for another button being pressed? That's going to take more Key Input Processing, but make sure that you're sending the information to a variable other than the one you used here.
Hope that helps, good luck ^_^