Button toggle

Hello! :slight_smile:

How to script a button when you press TAB, it reduces the walking speed or disable left click?

THANKS!!!

:slight_smile:

An easy way to do this with logic bricks would be to use states. Find a tutorial on logic states and try from there…

I’m not sure if this is the easy way but, create a controller expression and type in " w and (not tab) ",
Connect to sensors named w and tab as well as a motion actuator(slow motion one).
At last, connect w sensor to the faster actuator.

It’s a bit messy to do it this way if you wan’t more keys so using python would probably be a good idea, but unfortunately I do not know much python so you will have to do that on your own.