Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → stopping a repeating sound
stopping a repeating sound
2002-02-14, 10:54 AM #1
i have a sound repeating using

PlaySoundThing(alarm, g1, 1.0, 20, 30, 1);

what line do i use to stop it from playing?
2002-02-14, 12:09 PM #2
Like this:

Code:
Symbols

Message Any

Message Another

Sound Sounds

Int Channel=0    Local

Thing Bob

End
Code

Any:

Channel = Playsoundthing(Sounds, Bob, 1.0, -1, 100, 1);

Stop;

Another:

Stopsound(Channel);

Stop;

End



Understand?

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2002-02-14, 12:11 PM #3
BAH! That didnt turn out quit as Id hoped.


To stop a looping sound, use an int to capture the channel the sound plays on.

Int_channel = Playsound();


Then, to stop the sound,


Stopsound(Int_channel);

Hope that helps.

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!