Pressing and unpressing a key

(blengineer) #1

How can I make it so that if I press a key, it sets a property to TRUE, and when I let go of the key, it turns back to FALSE?

what i’m trying to do is make someone be able to move a certain way, but only when you hold down the correct button aswell. And when that button is not held down and you try to move, you move differently.

(z3r0 d) #2

expression controllers or multiple key sensors [one with inverted output]…

(blengineer) #3

Inverting the output might work…could it also have something to do with true and false pulses? If the action reacts to a true pulse and stops on a false pulse? Does that work? Because i’ve been trying that out and it doesn’t seem to have good results…

What would the expression look like? lol sorry if I seem like I know little…it’s probably because it’s true