TADS3 Adv3: Check if sound tag is active in layer?

Is there a way you would go about checking to see if a sound tag is actively playing in a layer? I want to implement a function that checks if room-specific music has stopped playing for whatever reason (ex: cls), and then re-queue that music if it has.

1 Like

I don’t think so, but you could always use a Boolean variable for this. When you start the sound, set a variable to true; when you stop it, or want to, just use the <sound cancel=layer> tag and set it to nil. I always have methods to do this; in fact, I have a whole ass module I created to handle sounds and images that I could upload to GitHub if someone really wanted to take a look at it.

4 Likes