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 / Replacing an old firing sound

Author
Message
Butt monkey
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location: Scotland
Posted: 7th May 2009 23:24
Hi there.

I am wanting to replace a gunfire noise with another. However, the new one is double the length of the old one. Animation wise, this will be OK as the gun is very slow and so the animations will sync up properly. Sound wise, I'm not really sure how to go about this. I've tried simply replacing it but nothing happens, so I'm guessing I need to edit the sound frames to incorperate the length of the sound? This is just an assumption and if I'm wrong please point me in the right direction. If I am right, could someone give me an idea as to what I should edit?


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 8th May 2009 05:55
The sound frames in the gunspec file simply tell FPSC which frame of animation the sound should start playing at. If the starting point of the sound is going to be the same, then you shouldn't need to alter that information.

You should be able to just replace the old sound file with your new one and it should work fine.


The one and only,


Butt monkey
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location: Scotland
Posted: 9th May 2009 12:09
Hmm, is there a maximum file size for the sound?
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 9th May 2009 12:37
I don't believe so


The one and only,


Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 9th May 2009 18:28 Edited at: 9th May 2009 18:33
Quote: "Hmm, is there a maximum file size for the sound? "


Not exactly, but depending on how the animations are set up and the version of FPSC which you are using, the sound may get cut off due to the way the playback for fire.wav is coded. AKIK, only Ply's Mod 1.08 allows long sounds to be played flawlessly. One work around is to leave the sound1 slot empty and use sound2 for your gunshot sound. Sound2 is the only sound which doesn't have hardcode restrictions on it in stock FPSC. If you do that, make sure the file name is NOT fire.wav because FPSC will look for it and as a sidenote you must have a fire.wav included with automatic weapons or else the animation playback get messed up for some odd reason.

edit:

you can also try adding a redundant soundframe for the firing but just don't put it too close to the beginning of the animation:

soundframes = 4
sframe0 = 54,1
sframe1 = 65,2
sframe2 = 95,4
sframe3 = 56,1
Butt monkey
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location: Scotland
Posted: 9th May 2009 20:52
Hi there guys. I managed to get the sound working properly. It turned out that the depth of the file was greater than FPSC would accept. Changing them to 16bit fixed the problem.

Login to post a reply

Server time is: 2024-11-25 01:32:07
Your offset time is: 2024-11-25 01:32:07