Chances are the sound files are improperly formatted for CC, either in terms of # of channels, frequency, bitrate, lack of headers, etc. - if you're using files ripped directly from a game, be sure you've processed them properly and that they play properly.
If you can, I recommend converting the files into .ogg format. They're a lot smaller, and this can save a
huge amount of space. This might not seem like a big deal, but it adds up very quickly if you have ~3-4 firing sounds per gun and many voiceovers per actor.
I tried a similar thing myself (Corpus + Grineer factions are a thing I want to take a shot at eventually) a while back but I can't get the sounds into a useful format at all. I have a pretty good idea of how to go about the fundamental code at least, but that's no good without a) sounds, and b) sprites.
FanSea wrote:
Now my second question isn't in need of immediate help as I'll probably stumble on its answer along the way, but it'd be nice to get a heads up for it.
How would one go on about creating a weapon which fires while spooling up(firing its bullets at a slower pace before reaching maximum fire rate)?
Gorgon? Gorgon.
The default spinup code is not very good; it's simply a delay before firing at max RPM, and custom spin noises tend to be buggy (or even undesirable).
Luckily for you, Cave whipped up a script for me a while back that'll work perfectly for the Gorgon (and any other climbing RPM weapon, for that matter);
Code:
function Create(self)
self.reloaded = false;
self.ammoCounter = 0;
self.spinDownTimer = Timer();
self.rofBase = 300;
self.rofIncreasePerShot = 50;
self.rofMax = 1050;
self.rofTimeToReset = 3000;
end
function Update(self)
if self.Magazine ~= nil then
if self.reloaded == false then
self.reloaded = true;
self.ammoCounter = self.Magazine.RoundCount;
else
if self.ammoCounter ~= self.Magazine.RoundCount then
self.spinDownTimer:Reset();
self.RateOfFire = math.min(self.RateOfFire + (self.rofIncreasePerShot*(self.ammoCounter-self.Magazine.RoundCount)),self.rofMax);
end
self.ammoCounter = self.Magazine.RoundCount;
if not self:IsActivated() then
self.RateOfFire = math.max(self.RateOfFire - (self.rofMax-self.rofBase)*(self.spinDownTimer.ElapsedSimTimeMS/self.rofTimeToReset),self.rofBase);
self.spinDownTimer:Reset();
end
end
else
self.reloaded = false;
end
end
The only four values you should edit are;
self.rofBase = 300;
self.rofIncreasePerShot = 50;
self.rofMax = 1050;
self.rofTimeToReset = 3000;
The first is the base rate of fire, what it starts at, and should match the weapon's standard value in the .ini files. The second is how much it gains per shot; higher = faster spin up. You can probably do some fancy math here if you know the time you want it to take, or just eyeball it. Third value is what the rate of fire caps out at (it won't go any higher). Lastly, the fourth value is how long it takes to unspool once you stop firing; it should also drop back down to base if reloaded. A short delay here allows for short bursts at high RPM without having to spin up again every time.