Page 1 of 1

How to stop music in the script editor?

PostPosted: Sat Oct 10, 2009 2:13 pm
by Garfield501
Well, here is the question.

How can I stop music from playing in the script editor?

Thanks in advance,
Mark


PS. Is there some kind of catalog, where all those commands are explained.
Then I don't have to ask all these questions.

Re: How to stop music in the script editor?

PostPosted: Sat Oct 10, 2009 3:46 pm
by Kalladdolf
There is some kind of catalog, it's called the "Documentation". You'll find it in the help menu.

First, create a variable (I'll name it "var" in this example).
When you want to play the music, enter the following command:
Code: Select all
var = PlayMusic2(//whatever music you wanna play);

On the event on which you want to stop the music, put:
Code: Select all
StopSound(var);

Re: How to stop music in the script editor?

PostPosted: Sat Oct 10, 2009 4:19 pm
by Garfield501
Okay, thanks

PS. what's the differnce between "PlayMusic" and "PlayMusic2".

Re: How to stop music in the script editor?

PostPosted: Sat Oct 10, 2009 6:46 pm
by skydereign
PlayMusic is obsolete. PlayMusic2 is the fix for that in earlier versions. I haven't been around since PlayMusic, so I don't know the specifics, but pretty much just use PlayMusic2.

Re: How to stop music in the script editor?

PostPosted: Sat Oct 10, 2009 6:50 pm
by Kalladdolf
If you select the option and not type it, Game Editor will pick PlayMusic2 anyway. Yea, there is no difference, really.