Quantcast
Channel: Questions in topic: "held down"
Viewing all articles
Browse latest Browse all 8

How can I check if a key/button is not (!) being held down?

0
0
I have a simple check for GetButtonUp and I would like to add a check to make sure another button is not being held down at the same time. For example, when the "W" button is released & the "A" button is NOT being held down (GetButton), then do something. I've tried adding a "!" infront of Input.GetButton but that doesn't seam to do anything: if (Input.GetButtonUp("Walk") && !Input.GetButton("WalkLeft")) { //do something } So how could I do this simple functionality?

Viewing all articles
Browse latest Browse all 8

Latest Images

Trending Articles



Latest Images