stopSound channel...

Game Editor comments and discussion.

stopSound channel...

Postby friedfish » Tue Jul 17, 2012 2:02 pm

i know stopSound stops a sounds we want to stop but how do we know the channel of the sound? :) anyone know? thanks... :)
User avatar
friedfish
 
Posts: 75
Joined: Wed Mar 14, 2012 2:31 pm
Location: UK
Score: 7 Give a positive score

Re: stopSound channel...

Postby Kalladdolf » Tue Jul 17, 2012 2:59 pm

The channel is a variable you determine to contain your sound.
So make a global variable called "SFX" for instance.
When you'd like your song to be played:
Code: Select all
SFX = PlaySound();

And when you'd like it to be stopped:
Code: Select all
StopSound(SFX);
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: stopSound channel...

Postby friedfish » Tue Jul 17, 2012 3:22 pm

oh thanks... so playsound returns an int... gotta read that documentation...

Kalladdolf+=1;
User avatar
friedfish
 
Posts: 75
Joined: Wed Mar 14, 2012 2:31 pm
Location: UK
Score: 7 Give a positive score

Re: stopSound channel...

Postby skydereign » Tue Jul 17, 2012 7:46 pm

friedfish wrote:oh thanks... so playsound returns an int... gotta read that documentation...

Kalladdolf+=1;

For the record, to give someone a point you need to click the [+] under their username.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: stopSound channel...

Postby friedfish » Tue Jul 17, 2012 10:08 pm

haha... I did not see that... so that's how they get the points...I need to give you some points sky... :)
User avatar
friedfish
 
Posts: 75
Joined: Wed Mar 14, 2012 2:31 pm
Location: UK
Score: 7 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest