stopSound and how to use it?

Game Editor comments and discussion.

stopSound and how to use it?

Postby ThaKid244 » Mon Jun 20, 2011 12:12 am

Will someone please explain to me how to use the stopSound function?
K Thanks! ;)
User avatar
ThaKid244
 
Posts: 34
Joined: Thu Dec 23, 2010 6:40 pm
Score: 0 Give a positive score

Re: stopSound and how to use it?

Postby skydereign » Mon Jun 20, 2011 7:39 am

Simply put, stopSound stops a sound in a given channel. When you use PlaySound2 it returns an int (which is the channel the sound is being played on). Now if you use stopSound and pass it that channel it will stop the sound. If you pass it 0, it will stop everything except the music. That is pretty much all there is to it. One thing to watch out for is if the sound in the channel ends, and you try to stop it, it could very well stop a different sound.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest