• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Sound Looping MG sounds

Nestor Makhno

Grizzled Veteran
Feb 25, 2006
5,753
1,118
59
Penryn, Cornwall
I am developing a loop for an MG which has a ROF of 550rpm.

At present the loop is just over .4 seconds for 4 'bangs' so the rate calculates to be about right. Obviously the loop is rather short at 4 cycles only but, given that it is a 20-round mag, I am not too worried about the sound being very repetitive. Calculating this out, you would expect a full-mag burst to be 19 looped bangs plus one end bang in just over 2 seconds.

What we actually get is about 4 or 5 bangs and all bullets discharged in what appears to be under 1 second. Obviously the first thing that occurs to me is that the coder messed up the ROF but he swears he hasn't.

So is there any other explanation or is there something I have not done in the preparation of the sound file to get this to work?
 
I am developing a loop for an MG which has a ROF of 550rpm.

At present the loop is just over .4 seconds for 4 'bangs' so the rate calculates to be about right. Obviously the loop is rather short at 4 cycles only but, given that it is a 20-round mag, I am not too worried about the sound being very repetitive. Calculating this out, you would expect a full-mag burst to be 19 looped bangs plus one end bang in just over 2 seconds.

What we actually get is about 4 or 5 bangs and all bullets discharged in what appears to be under 1 second. Obviously the first thing that occurs to me is that the coder messed up the ROF but he swears he hasn't.

So is there any other explanation or is there something I have not done in the preparation of the sound file to get this to work?

Simply put.. what value does he have for FireRate ?

Using the figures I list here it's pretty easy to figure out the calc I used. Honestly I can't remember the formula.. :p

Here's a couple:

Code:
    //** Animation **//
    // Rates
     // fire rate = Seconds between Shots
     // 6.0 == 10 RPM
     // 2.0 == 30 RPM
     // .1  == 600 RPM
     // .12 == 500 RPM
     // .0857 == 700.1 RPM    (.085 is good enough)

    FireRate=0.1 // 600 rpm
 
Upvote 0