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 / sound stop in zone

Author
Message
shadowfire
15
Years of Service
User Offline
Joined: 24th Mar 2009
Location: England
Posted: 15th Jun 2009 20:01
hello, i'll keep this short:

how can you change a sound zone so that when you go into it the sound that was playing stops?
for example:
start of level: sound zone on loop
end of level: sound zone that stops the sound being played by the original sound zone

the onion mind probes are coming for your soul...
they take your humanity... and give you...
onionity.
Freakon
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location:
Posted: 17th Jun 2009 16:40
Without testing I guess you could set up a second sound zone with the soundchangeinzone script and not point the audio selection to anything, the new zone should in theory stop the old music to try and play the new sound, even if nothing is presented to be played?

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 17th Jun 2009 17:48 Edited at: 17th Jun 2009 18:11
Use the stopsound action...

Quote: "

STOPSOUND

Will stop any looping sound currently being played by the entity. (Does not work for MUSIC)

"


The Official Community Guide to FPS Creator – Revision 2 Page 62


Here is a little script we can call stopsoundinzone.fpi that you can use to make a trigger stop a looping sound.



It is a modified soundinzone.fpi , so you can goto the scriptbank and compare the two.

Look at the soundloopinzone.fpi which is what your start sound zone's Main AI should be set to for the loop.

Read the the guide too, and you will soon be tackling these basic scripting tasks on your own.

Freakon
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location:
Posted: 17th Jun 2009 18:22 Edited at: 17th Jun 2009 18:24
Ah, that would probably be easier, same idea, different (and more appropriate) script! lol

I am young, but I will learn....

shadowfire
15
Years of Service
User Offline
Joined: 24th Mar 2009
Location: England
Posted: 17th Jun 2009 18:40
yeah, i already wrote a sript like that, and unfortunately it didn't work as i was using it for music.
but i'll try that one, as it is slightly different to mine.

the onion mind probes are coming for your soul...
they take your humanity... and give you...
onionity.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 18th Jun 2009 06:11 Edited at: 18th Jun 2009 06:16
You specifically said sound until now, and that makes a big difference.
The stopsound action does not work for music.
My answer above was only when using sound loops, not music.

Use his method for music.

Play a very short clip of silence.

Yes the music loops automatically but that is just it, the music is background music that plays constantly.
So, calling a file of silence like he said to do is the only way to stop the music.

Like this
.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 18th Jun 2009 07:10
Orrrrrrrrr, you could use this:


Or even:



The one and only,


shadowfire
15
Years of Service
User Offline
Joined: 24th Mar 2009
Location: England
Posted: 18th Jun 2009 18:46
thanks!
i'll have a go at that.

OFFICIAL GOVERNMENT CONSPIRACY
plystire controls the internet, there is nothing you can do as he will give you awesome mods through viruses.
DO PANIC

Login to post a reply

Server time is: 2024-11-25 03:00:58
Your offset time is: 2024-11-25 03:00:58