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 Distances?

Author
Message
Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 24th Jan 2012 04:55
This will be my last request for a while, but if someone knows how to do this it will surly help out the community. Now i do not know if this is possible, but i was wondering how i might be able to make a sound quieter as you go farther away from it, and louder as you get closer. I know the metro theatre does this with the soundscale.fpi, but there is a problem. I tried to edit that and i still got the waterfall sound for some reason and as soon as i walked closer the song would restart.

What i need is like 3 trigger zones placed, each controlling the volume of a sound/music. I was wondering if this was possible?

Thank you,
- Josh
Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 25th Jan 2012 01:21
Never mind... I figured it out, sorry for posting this. A mod can lock this now!

- Josh
maho76
15
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 25th Jan 2012 09:48 Edited at: 25th Jan 2012 09:49
please tell us your solution so others searching for things like this wont get help when finding this thread. also for me, i didnt find a solution for this yet, even after an evening of scripting and testing.

thanks

Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 25th Jan 2012 21:08
Even if i do describe the solution, new users here will make a new thread anyways. There is nothing to stop that. But here is how i figured it out:


SOLUTION
- This actually doesn't have any scripting needed. Now i am using V1.19, so it may have something to do with that. But what you do is you place a sound zone where you want the sound to originate from (WHERE THE SOUND ZONE IS IS WHERE IT IS BEST HEARD, so if you expand the sound zone it will be quieter until you get to the where the zone is.

- Once the sound zone is placed, obviously change the sound to the sound that you want. Keep the original script in the "main" section of the sound zone. Now go to this directory:

C:\Program Files (x86)\The Game Creators\FPS Creator\Files\languagebank\english\gamebank\mygame

This may be a tad different if you don't have a 64bit computer, but it should still be about the same. Now open up the setuplevel.fpi in notepad and look for the line that says:

Quote: ",musicvolume=20,soundscale=10"


Now as you can see, soundscale is set to 10 for me. 10 seemed appropriate for my level but it could differ for yours. What that means is the distance it takes for the sound to get quieter as you walk away. Just change it to something that you like, and DONE


Can you please test this to see if this works? It did for me. This is literally all i did to make this work.
BlackFox
FPSC Master
18
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 25th Jan 2012 21:47 Edited at: 25th Jan 2012 21:48
The method you describe works well, and not just in FPSC v1.19- it will work in any of the versions. We use this method in our V1.17 game developments.

We set the setuplevel.fpi to have:

Quote: ":state=0:music=0,musicvolume=50,soundscale=25"


The reason my line has "music=0"? Simply because of this. If I have music playing in the loading page and the game loads but the music is NOT finished, there is an error when the game starts up. This is because the loading page is still playing the music but the setuplevel page wants to play the music that line has and the two conflict. Thus the command to end the loading music.

In a script attached to a trigger or an entity the player will pass through or interact with, we can adjust the volume and change the music at that moment with the "music=x,musicvolume=x,soundscale=x" commands. It is quite handy for development to use this method for us.


Twitter: @NFoxMedia
Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 25th Jan 2012 21:54
Quote: "The method you describe works well, and not just in FPSC v1.19- it will work in any of the versions. We use this method in our V1.17 game developments. "


Yeah i didn't know what version you needed really, so i assumed it was just v1.19. But the only thing that bugs me, is even that though it is set at 10 i can still hear it in the next room. Like, it never really goes away. But i can't go lower because then it isn't really that realistic (As in when you take 8 steps let's say away from the source, then it is really quiet. Which in real life you would still be able to hear it pretty well.)

But thank you for the information about the loading song issue, i have had it error when the game starts and i couldn't figure it out. Now i know what to do

- Josh
maho76
15
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 26th Jan 2012 13:41
ah, ok, i thought of a solution for a single entity or zone. really bad that this isnt possible because some (most) of the normal sounds should be heared further, was just for some ... lets say "longer whispers" that should only be heared in a spot.

thank you anyways, desecrated.


maho

Desecrated Studios
15
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 26th Jan 2012 21:14
Quote: "thank you anyways, desecrated."


Of course man! If you ever need any help, don't hesitate to send me an email I may not know how to help, but i will try!

- Josh

Login to post a reply

Server time is: 2026-07-11 14:37:35
Your offset time is: 2026-07-11 14:37:35