Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Is it possible to stop sounds from playing via scripting?

Author
Message
Ri99ers
18
Years of Service
User Offline
Joined: 8th May 2006
Location: UK
Posted: 18th May 2006 23:17
Hi Guys,

Ok, noob question here. I have a soundzone set up to play a .wav file as I enter a room. I would like to know if it's possible for this sound to be stopped playing as I leave the room, rather than when it reaches its own conclusion.

Having searched through the forums, it seems as if FPSC is missing the StopSound command that would be the ideal solution, but I was wondering if anyone has come up with any solutions of their own that I may have missed in my search.

Any help appreciated
Essal
18
Years of Service
User Offline
Joined: 15th Jan 2006
Location: inside your webcam, watching YOU.
Posted: 21st May 2006 19:22
yes, make a sound zone (i think its called) and just make it the size of the room, in that way the sound will only play when you are in the zone/room.

Check out http://www.freewebs.com/lasse-b for free Stuff for FPSC
Ri99ers
18
Years of Service
User Offline
Joined: 8th May 2006
Location: UK
Posted: 23rd May 2006 00:12
Ok, I tried that but it doesn't seem to work properly. The sound will continue to play for its duration even if I leave the zone. It only seems to stop when it reaches the end of the sample. This is a bit annoying, as I've now got multiple samples playing over the top of each other

Any other hints?
brummel
18
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 24th May 2006 19:44 Edited at: 24th May 2006 19:46
stopsound will stop the sound from playing so you could add this to your script so it looks like this:


Ri99ers
18
Years of Service
User Offline
Joined: 8th May 2006
Location: UK
Posted: 24th May 2006 21:28
Thanks for that Antimatter, it worked a treat once I tried it.

Ri99ers.

Login to post a reply

Server time is: 2024-11-22 09:40:09
Your offset time is: 2024-11-22 09:40:09