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 looping script

Author
Message
Qwartje
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location: I am in ur heads staring in teh deep!!
Posted: 11th Mar 2008 13:05 Edited at: 11th Mar 2008 13:09
Hi, in FPSC there are 4 scripts i've seen that play music/sounds:

When applied to a sound Zone this is what they do:

SoundInZone - This starts the chosen sound and plays it ones.

SoundsLoopInZone - This starts the chosen sound and plays it over and over IF UR IN THE SOUND ZONE.

RepeatSound - This one starts the sound to play over and over but FROM THE BEGINNING OF THE LEVEL>

MusicInZone - This one does excactly the same as SoundInZone.



What I Need is a script that will activate a sound to play over and over again after entering the sound zone AND TO KEEP PLAYING YOU DONT HAVE TO BE IN THE SOUND ZONE.


I'm dutch so this post may sound Demanding or Rude in some ways, Forgive me if so, my grammar isn't perfect.

I am under ur postz, end i stolenz ur siggy!
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 11th Mar 2008 14:25
The script you're looking for is repeatsound.fpi. Try attaching it to a trigger zone instead of a sound zone.

Qwartje
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location: I am in ur heads staring in teh deep!!
Posted: 11th Mar 2008 14:30 Edited at: 11th Mar 2008 14:40
If i "attach" it to a trigger zone i will not be able to specify wich sound i want to play,,

Also as a stated in my first post, this will play the song from the beginning.

I'm looking for someone who can modify or make a script (will credit if used in game) that will do what i want it to do as i said in the first post '.'

Thx for ur help though


**EDIT**
It Does seem to work with a trigger zone However it still plays from the beginning of the level and not when you walk into the zone..

I am under ur postz, end i stolenz ur siggy!
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 11th Mar 2008 14:41
Quote: "If i "attach" it to a trigger zone i will not be able to specify wich sound i want to play"


Yes, you can, at the bottom of the properties where it says sound0.

The song should only start once you're in the trigger zone, and then repeat.

Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 11th Mar 2008 14:45
Quote: "It Does seem to work with a trigger zone However it still plays from the beginning of the level and not when you walk into the zone.."


Weird, I've just tested it and it works perfectly. Are you sure the trigger zone isn't exactly where the player starts?

Qwartje
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location: I am in ur heads staring in teh deep!!
Posted: 11th Mar 2008 15:23 Edited at: 11th Mar 2008 15:28
Maybe you have a different code.. (dont thinks so)

Heres my repeatsound code :



The bold text is what worries me..



Also.. could you try it when the triggerzone is in a checkpoint..
Thought that might cause some problems to,,


"Nevermind the underlined"

I am under ur postz, end i stolenz ur siggy!
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 11th Mar 2008 18:34 Edited at: 11th Mar 2008 18:35
Weird, I've just tried it again and now it's playing as soon as you start, just like you said! Anyway, I've played around and here's a slightly revised script.



Call it repeatsoundaftertrigger.fpi and call it in the Main of the trigger zone.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 12th Mar 2008 03:23
Use this one instead for the "MainAI" of your triggerzone:



Setting the alpha fade is something only needed for appearing scripts or disappearing scripts... not Main scripts, and certainly not for zones.

Also, the rundefaultfpi=1 would simply waste CPU power because it'll just tell thezone to use it "MainAI" again. lol


The one I've given will start the sound looping whenyou enter the triggerzone, and will STOP looping if you activate it via "activateifused=1" from another script. However, if you want it to stop and remain stopped, then activate it with "activateifused=2" from another script, and it will terminate indefinitally.


Have fun!


The one and only,
~PlystirE~

Qwartje
16
Years of Service
User Offline
Joined: 27th Dec 2007
Location: I am in ur heads staring in teh deep!!
Posted: 12th Mar 2008 16:44
Great thank you both!

Haven't had time to test yet but i'm sure it'll work ^^

I am under ur postz, end i stolenz ur siggy!

Login to post a reply

Server time is: 2024-11-24 06:30:42
Your offset time is: 2024-11-24 06:30:42