how 2 creat Mute?

Talk about making games.

how 2 creat Mute?

Postby game_mate » Fri Jun 17, 2005 12:24 am

how do i creat an acter that, when clicked on will stop a wav file and prevent any other wavs from playing, wich would usually play otherwise
. like a mute botton
game_mate
 
Posts: 16
Joined: Sat Dec 11, 2004 2:37 am
Score: 0 Give a positive score

Postby BeyondtheTech » Fri Jun 17, 2005 7:47 am

I use a setup similar to this

stopSound(musicchannel);
musicchannel=PlayMusic2("data/music.ogg",musicvolume,65000,MEDIUM_PRIORITY_MUSIC);

That way I know what channel the music is on and I can stop it when I start a new track or if I need to stop it at any time, I just execute stopSound(musicchannel);

Of course you can set up variables for each sound you make so you know what channel they're playing on.
User avatar
BeyondtheTech
 
Posts: 270
Joined: Wed Mar 30, 2005 6:34 am
Location: Edison, NJ
Score: 4 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: Google Adsense [Bot] and 1 guest