Looping MG sounds

  • 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/

Nestor Makhno

FNG / Fresh Meat
Feb 25, 2006
5,758
1,118
0
56
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?
 

UncleDrax

FNG / Fresh Meat
Oct 13, 2005
1,494
60
0
Florida, USA
www.endoftheworldfor.us
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
 

Nestor Makhno

FNG / Fresh Meat
Feb 25, 2006
5,758
1,118
0
56
Penryn, Cornwall
ah - well we checked the code and it appears that the gun was set to fire 1400 rpm, :eek: which would be awesome if it weren't for the 20 round mag. :rolleyes:

Now corrected and suitably BAR-like :D

Many thx drax. As usual you have been a great help - how're the cheese seeds growing? Keep them well watered mate ;)
 

Vakichev

FNG / Fresh Meat
Mar 19, 2006
301
0
0
Yeah one extra zero there nestor =D. Little bit of a problem, no wonder that mag depleted so quickly.