I’m trying to create function in Inform 7 that allows me to get an input from the player (sometimes yes or no, but not always), where the player can input their selection by pressing an appropriate key or clicking a hyperlink.
I’ve managed to get both to work independently; I can get a character with
and then keep looping until the input is validated as an acceptable option, or I can get a hyperlink input by waiting for a timed event with
and then looping until
the glulx replacement command
is an acceptable option. But I can’t work out a way to do both - as when I wait for a character input, the game will not progress until a character is pressed, and when I wait for a timed event, I don’t know how to simultaneously check for the most recent character input.
I’m hopeful there’s a super straightforward way to be able to accept either, and one of the experts here can enlighten me?
Thanks in advance!