Need help with a little bit of code

Ok i attached my BAS file.
The problem is my movement controls.
I’ll explain how my bot works based on control.

When i send a movement command, i must repeat the command, or any command continuously. if it doesn’t receive a command it goes to section labeled “hault”
This way it only moves when i repeatedly send the movement command. (IE i hold down the button that sends the move forward command)

However, if it will keep moving in the same direction, until i send it a hault command, so if i send forward, then reverse immediately before it times out, it will keep going forward.

Please make notice of the areas that use the “meep” variable.

What i want to do, is add a second check, to see if the currently received command is the same as that originally initiated the movement. And if not, change to the new movement.

For example, if i’m going forward and i push reverse before it times out, it would go reverse. without me first having to stop sending it commands.

I haven’t quite firgured out how to program this, i could probably figure it out, but it’s been a while since i actually did any programming, i just cant remember how i even did all this.

If i figure this out before anyone replies, i’ll delete this thread.
temp5.bas (7.33 KB)

Well i figured it out.

I kept trying to mod my current check commands and adding a 3rd check into the previous checks, but it didn’t work, so i ended up making a whole new check command that triggers if the first 2 checks pass.
I’ll attach my new code if you want to see it.

I can switch from forward to reverse on without having to stop now.
Now i just need to reconfigure my xbox 360 controller.

By the time i’m done i’ll have much more movement controls than just forward/reverse, and rotate left/right.
I’ll have forward right, forward left.
IE make forward right, the left track would move at 1.0 speed while the right track forward at 0.5 speed

I guess all i needed was a good nights sleep. I don’t understand all my coding, i’m kind of winging it half the time, a lot of trial and error, but what ever, it works.
temp5.bas (7.69 KB)