Music Question!

Anonynn
23 Dec 2018, 18:54

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.


XanMag
23 Dec 2018, 19:20

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


Anonynn
23 Dec 2018, 21:07

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


Anonynn
24 Dec 2018, 05:49

Or are you talking about something different?


Anonynn
24 Dec 2018, 06:36

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.