Quantcast
Viewing latest article 13
Browse Latest Browse All 85

How would I have a script either wait on a timer OR for a button press?

Hello, I am currently writing an RPG talk script. Concept is simple enough, you talk to a character, and I'm essentially trying to code in an option to skip their dialogue. Here's a snippit of code: ` IEnumerator Wait(){ yield return new WaitForSeconds (4.0f); FirstResponses (); }` So, as you can see, its currently set to continue on after 4 seconds, which works perfectly fine. I've tried a few methods to no avail to try to add a keycode check to see if the player presses a key, but I can't seem to get it right. I want it to continue the timer in case the player **doesn't** skip the text, but an option that would allow them too otherwise.

Viewing latest article 13
Browse Latest Browse All 85

Trending Articles