That is not required for holding down a key to match a button state on a joystick. You're pressing the key repeatedly within the loop, essentially spamming that press, which is unnecessary in the majority of cases.
The "{STATE_" series of tokens has also been superseded (aside from niche use) by the "Device State" tab in loop/condition actions.
This would be the current method:
Press down Left Shift key
Start Loop While : Joystick 1 Button 1 Is Pressed
End Loop
Release Left Shift key
Reviving this post again to say I can't get this to work.
Currently what I am trying to do is make it so while you hold the left mouse button it will press the left mouse button every 0.2 seconds (Trying to make a controlled fire command).
So far, the command is triggered when I press C, I have it repeat continuously until stopped which it stops when you press C again. This part I have works.
However, inside the command I put:
Start Loop While : Left Mouse Button Is Pressed
Say, 'Fire'
Pause 0.05 seconds
End Loop
(Currently using the Say, Fire just as a testing bit)
This worked perfectly, spamming the word fire while I hold the left mouse button.
But, when I add in the command to click the left mouse button as well, making it:
Start Loop While : Left Mouse Button Is Pressed
Click left mouse button
Say, 'Fire'
Pause 0.05 seconds
End Loop
It only fires once, then stops.
I assume this is because the Click left mouse button command presses the button down
then lets it back up, which since the while loop is meant to only continue while it's pressed, stops it. When I change it so the while loop waits for middle mouse button is held, it works.
So, I know the problem has to do with clicking the same button as what the while loop is looping for. Is there a way around this other then assigning a different key to the while loop? I like to be able to click the same fire button.