Help : touch pressed too many refreshes

Hi,

I just want to make successive dialogs in a simple game : when we met someone, a text is shown “Press SPACE to talk”. Then, when the user press SPACE, I iterate through a collection of strings with a simple “++” operation, because I want to show another string each time I press SPACE.

The problem is that my routine is called in the Update function…so when I press SPACE, it presses 5-10 times in place of just 1 !

How can I block the input to respond to just one press at a time ?

Thanks a lot.

use Input.GetKeyUp() instead of Input.GetKey(), then it only fires once when the key is released and not all the time while the key is held down…

Thanks :slight_smile: !!

so easy in fact, i just forgot that… :sweat_smile:

Bye