[SOLVED] Cycle through vJoy axis values with repeated button press
Posted: Thu Jan 19, 2023 3:44 pm
Hi all,
I'm trying to create a script to toggle between three vJoy axis values with a repeated key press. Something like this:
Sadly, this doesn't work because I have no idea what I'm doing.
Error: unexpected token '='
Is this a formatting error? Am I missing a step? Misunderstanding a concept? Something else?
I'm trying to create a script to toggle between three vJoy axis values with a repeated key press. Something like this:
Code: Select all
x = 0
if x = 0 and keyboard.getPressed[A]:
x = 512
if x = 512 and keyboard.getPressed[A]:
x = 1024
if x = 1024 and keyboard.getPressed[A]:
x = 0
vJoy[0].x = x
Error: unexpected token '='
Is this a formatting error? Am I missing a step? Misunderstanding a concept? Something else?