I have a dialogue system that has two states. Either "WaitForInput" = 0, or 1.
Meaning it has a state when the text is still scrolling by and when the text is finished and awaiting the player's input to continue.
I want to let the player hit the Enter key to skip the dialogue to the end of the scrollby, as well as use the Enter key to advance the dialogue when it has finished the scroll as well. (As defined by those two separate functions)
The issue is when the player hits 'Enter', it does skip to the end the first time, but then when Enter is hit another time to advance the dialogue, it automatically skips to the end of that dialogue- negating the scrollby effect. To my understanding- it's because it's functioning like:
WaitForInput = 1, meaning the dialogue has ended. Player needs to hit Enter to advance the dialogue.
Player hits Enter.
Dialogue is advanced and is scrolling by, but because the switch caused WaitForInput to equal = 0 now, at the same instant that Enter is still being pressed, it activates the skip function every time.
I think there is a fundamental easy step I'm missing to ensure that double-actions don't happen on single key functions, but I'm just not seeing it. I know this has got to be a problem someone else has faced before. Any insights?