C# Check for multiple key presses and their combinations
Hello,
Is there any way to chceck if was pressed key 1 and 2, than save that it happened?
I have:
if (Input.GetKey("1"))
if (Input.GetKey("2"))
jd.enabled = true;
if (Input.GetKey("1"))
if (Input.GetKey("3"))
jt.enabled = true;
jd.enabled = true --> that is for displaying object
First issue I have with this is that I have to hold down simultaneously key 1 and 2, I want to press 1 and then 2 in let's say 2 second spam. And it should work if you press 2 and then 1.
The other issue is that I can't figure out how to check if combination 1,2 and 1,3 was pressed and base on that for example write some text. But only if both were pressed.
Something like this is not valid possibility:
if (Input.GetKey("1"))
if (Input.GetKey("2"))
if (Input.GetKey("1"))
if (Input.GetKey("3"))
Debug.Log("Something")
I have 15 possible combination of key presses and around 2000 possible output combinations.
I'm totally new and have no idea how to do this... thank you for any help!
Your answer
Follow this Question
Related Questions
Why does this condition keep being true even if its not? 0 Answers
Help with rotation please 2 Answers
Infinite Time inbetween if statements? 2 Answers
if statements are running when they are not suppose to be 1 Answer
Can't Locate gameobject in array 3 Answers