Music Question!

I'm more or less just curious about this one.

I wanted to create a command where the player can type "music" and have it turn on an off music...but this would require Quest to know WHEN the music is off and on?
or
something more simple where typing "music" turns off any current music.

I'd prefer the top thought --- but I'll go for the second if it isn't possible. Anyone have a lot of experience with this?

Anonynn.


Can’t you just set a flag when the music comes on and check it when the player types music?


I'm not sure what that looks like in code though.

I know it isn't like...

if (game.music=True) {
}
else {
play sound. 
}

or something like that


Or are you talking about something different?


What I did was...

I created a universal command, "stop music" that stops any current song/sound playing.

In the room where music starts I also created a command so that if the music ends, the player can go back and type "music" or "play music" to get it playing again.

Anonynn.