Game Development Community

Attack delay question

by Joel Hargarten · in Torque Game Engine · 11/02/2005 (10:09 am) · 2 replies

Hey.
When I hit the attack button there is a delay between attacks. I would like it to be rapid fire that attacks immediately when I hit attack. Where do I go to change this?

#1
11/02/2005 (11:40 am)
// Fire the weapon. Calls the fire script which does
   // the actual work.
   stateName[3]                     = "Fire";
   stateTransitionOnTimeout[3]      = "Reload";
   stateTimeoutValue[3]             = 0.01; //adjust this for fast or slow firing
   stateFire[3]                     = true;
   stateRecoil[3]                   = LightRecoil;
   stateAllowImageChange[3]         = false;
   stateSequence[3]                 = "Fire";
   stateScript[3]                   = "onFire";
   stateSound[3]                    = MyWeaponFireSound;

The above is a section of the "datablock ShapeBaseImageData(MyWeaponImage)" (where this is the datablock for your weapon). You can adjust the stateTimeoutValue[3] value.
#2
11/02/2005 (12:58 pm)
Thanks, works great now.