"Pausing" the game while music plays--is it possible?

In the event that I were to use sound in an Inform project, for sound effects/music/whatever, and assuming I had a piece of music that played at a particular point in the game, would it be possible to stop accepting player input until the music is finished so they don’t continue the game before it’s over? Conversely, is it possible to have music that’s currently playing stop when the player take a particular action?

You can use Erik Temple’s extension ‘Real Time Delays’ to generate real pauses. So you’d start your music playing, then run a pause of the same length. Forcing players to truly pause for more than even a little while could quickly aggravate them, but you probably already knew that.

inform7.com/extensions/Erik%20Te … index.html

As is, the extension offers (a) pauses which can be broken by hitting space, return, or escape, and (b) a second kind which can only be broken by hitting escape. It seems like a good idea to leave the option of hitting escape in there.

That’s real easy. You just tell the music to stop when they do the particular action :slight_smile: Look in the extension ‘Multiple Sounds’ by Massimo Stella with slight input from myself. It gives you the main controls and code for this stuff. That’s the main sound extension for the kind of things you want. There’s only one other glulx sound extension so you probably wanna check that, too.


  • Waden

Excellent, thanks!