Heya. Already back to ask another question.
There’s a part of the game that I’m building where I’d like the screen to display a message that plays itself on repeat until the player presses a key.
I saw this feature in a Quest game recently (the opening of “First Times” by Hero Robb, if you’d like to see what I mean by creating a ‘looping message’), but I’m wondering if it’d be possible to write something like it in Inform 7. It’s really easy to accomplish in Quest, but I can’t sort out how to do it in any other program.
I’m guessing that it’d probably be appropriate to use “Variable Time Control” by Eric Eve somehow, but I haven’t solved my problem yet.
Also, I’m using Glulx in my game, currently, but I can go without it if necessary.
As far as I know, Inform 7 does not have time-triggered events—real time that is. Also, as far as I know, there are some wizards in this forum that will probably tell you how to do it, anyway.
I haven’t checked what you meant by “looping message”, but if you need real time, there a nice extension by Erik Temple that makes it easy.
From what I understand, pinging a timed repeating message at players in a parser game is generally not a good idea because of screen readers, and also because many people playing these type of games tend to like to take time to respond to things and make up their minds.
There are several ways to get across what you’re wanting in a “turn-based” fashion that people expect. One is just making an every turn rule:
Every turn when alarm is true:
say "The computer bleeps: WARNING. SELF DESTRUCT IMMINENT."
This will show the message every turn while the alarm flag is set to true.
Another option is an “Instead of doing anything except…” rule.
Instead of doing anything except pushing the red button when alarm is true:
say "You're unable to ignore that continuously bleeping red message on the screen: SERIOUSLY, PUSH THE RED BUTTON TO NOT DIE, HUMAN."
In essence, you’re narrating the looping message instead of actually simulating it onscreen, which in 95% of cases is the best way to go. Just as in books - you really don’t need to play a loud sound to get across “An ear-splitting sound deafens you momentarily.”
If you’re just wanting to freeze the game until the player responds on their actual keyboard, the “Basic Screen Effects” extension has a [pause the game] feature (which tells the player to hit any key before proceeding.
If you’re looking for the actual “pop up warning message” feel, there is a built-in feature of Inform 7 called “boxed quotations” which is meant to show an Infocom-like quotation overlayed on top of the screen in a box which you could use for your alert box that pops up every turn. Usually these will only display once, but I believe there is another extension that allows repeatable boxed quotations.
Thanks everyone for the ideas. I’ll see what I can work out.