I'm making a cleo and I've added a speed up and slow down button that basically add + or - 1.0 to a variable when a key is pressed like so
and it works fine but i want to set a limit, Is there a way i can set it so a variable has a range and it doesn't go higher or lower than certain numbers for example no lower than 1.0 or higher than 10.0, the only opcode i've seen makes the variable a random number between a range of your choosing which isn't useful.
ive tried
in hopes it will jump past the speed up command once the variable reaches 10.0 but when i add that it makes the function not work all together
any help will be appreciated
Code:
wait 0
if
key_pressed 1
jf @thread_whatever
1@ += 1.0
and it works fine but i want to set a limit, Is there a way i can set it so a variable has a range and it doesn't go higher or lower than certain numbers for example no lower than 1.0 or higher than 10.0, the only opcode i've seen makes the variable a random number between a range of your choosing which isn't useful.
ive tried
Code:
wait 0
if
1@ == 10.0
jump @Thread_whatever
if
key_pressed 1
jf @thread_whatever
1@ += 1.0
in hopes it will jump past the speed up command once the variable reaches 10.0 but when i add that it makes the function not work all together
any help will be appreciated