Looping sound for wepaons
by Dennis Saarela · in Torque Game Engine · 03/18/2005 (4:08 am) · 4 replies
Searched through the forums for information on looping sounds to weapons.
I tried it in HEAD but it didn't work. It's seems it worked in Tribes 2 but not in Torque 1.x. Has anyone made this work (somewhere), because I really need this to make my machinegun sound good.
I tried it in HEAD but it didn't work. It's seems it worked in Tribes 2 but not in Torque 1.x. Has anyone made this work (somewhere), because I really need this to make my machinegun sound good.
#2
I'm not sure if this was phrased clearly enough, the thing is that we have a weapon that behaves like a rapid fire machine gun, and playing single sounds for each shot does not work, because a lot of the sounds disappear, as there aren't enough channels, if I understand this correctly. It sounds real bad, anyways. :)
So, what we want to do is play a continous, looping sound for as long as the player presses fire, so we can make a longer machinegun sound and play that, like most games do nowadays. We haven't found anything for this, although of course we might have missed it, and would be really happy if that was the case.
Oh, and if it matters, it is multiplayer, so others should hear our gun too.
03/19/2005 (6:29 pm)
Billy, what works fine? (I'm working with Dennis, he's away though and I'm not really familiar with these parts of the code, so if I say things that makes no sense, I'm sorry :)I'm not sure if this was phrased clearly enough, the thing is that we have a weapon that behaves like a rapid fire machine gun, and playing single sounds for each shot does not work, because a lot of the sounds disappear, as there aren't enough channels, if I understand this correctly. It sounds real bad, anyways. :)
So, what we want to do is play a continous, looping sound for as long as the player presses fire, so we can make a longer machinegun sound and play that, like most games do nowadays. We haven't found anything for this, although of course we might have missed it, and would be really happy if that was the case.
Oh, and if it matters, it is multiplayer, so others should hear our gun too.
#3
when you press fire , thats why i asked about the weapon states in your
machinegun.cs or what ever is called.
I dont use machineguns or simular in my game so its not part of my script base.
But try this ,its from the crossbow script.
you have to change it to fit you needs .
Dont forget to change the crossbowfiresound to use a looping description.
03/20/2005 (5:03 am)
I understand what you mean , you want a looping sound playedwhen you press fire , thats why i asked about the weapon states in your
machinegun.cs or what ever is called.
I dont use machineguns or simular in my game so its not part of my script base.
But try this ,its from the crossbow script.
stateName[3] = "Fire"; [b]stateTransitionOnTimeout[3] = "Fire";[/b] stateTimeoutValue[3] = 0.2; stateFire[3] = true; stateRecoil[3] = LightRecoil; stateAllowImageChange[3] = false; stateSequence[3] = "Fire"; stateScript[3] = "onFire"; stateSound[3] = CrossbowFireSound; [b]stateTransitionOnTriggerup[3] = "Ready";[/b]There is lots of ways todo this ,you can use spinup and spindown and more
you have to change it to fit you needs .
Dont forget to change the crossbowfiresound to use a looping description.
Torque 3D Owner Billy L