I'm trying to make a script that will prompt the user and wait for them to press a key indicating the answer, or if no key is pressed for a fixed amount of time choose the default option.
Sadly, I'm doing this in an environment with lua embedded into it, so I cannot add libraries or modify the source. Also io.read blocks until the user presses enter and io.popen is not available.
Is it possible to do this?
P.S. I need this for a game where something is happening by time, proceeding in stages, and you need to decide when to take action without much time to think about it. If you can think of another way to do this, please tell me.
requireand so forth)?