Checking Input on 2 different coroutines at the same time

Hi, this is my problem:
I have 2 different coroutines that are “waiting” to check when the player presses the keys “1” or “2” of the keyboard.
Is a Conversation system, so, the ConversationController is waiting for the keys 1 or 2 to continue the next string of the dialogue, while other script containing the dialogue, is waiting for the player to press 1 or 2 in order to choose the option to say.

I found the problem that the player must press 2 times the key; To choose the option and to continue the dialogue.

The issue could be solved by using Input.GetKeyDown () on the ConversationController, and Input.GetKeyUp () in the other script.

But I do not really like that solution. I want to understand why 2 cueroutines can not check at the same time Input.GetKeyDown

Thanks for reading and helping :slight_smile:

Why are you using two Coroutines? Why not use the Update function? You shouldn’t need Coroutines to “wait” for input.

if ( Input  "1"){
     // Select option 1
     // Advance dialog
} else if ( Input "2"){
     // Select option 2
     // Advance dialog
}