Author Topic: Weapon [Can't Get My Gun To Shoot Faster] {Solved}  (Read 1071 times)

I can't get my Machine Gun to shoot more per second. I have Tried stateTimeoutValue[2] and
  • . There is no stateTimeoutValue[1] and [3] and [4].


Are these the right parts of the script?
Code: [Select]
  // Images have a state system which controls how the animations
   // are run, which sounds are played, script callbacks, etc. This
   // state system is downloaded to the client so that clients can
   // predict state changes and animate accordingly.  The following
   // system supports basic ready->fire->reload transitions as
   // well as a no-ammo->dryfire idle state.

   // Initial start up state
stateName[0]                     = "Activate";
stateTimeoutValue[0]             = 0.0;
stateTransitionOnTimeout[0]       = "Ready";
stateSound[0] = weaponSwitchSound;

stateName[1]                     = "Ready";
stateTransitionOnTriggerDown[1]  = "Fire";
stateAllowImageChange[1]         = true;
stateSequence[1] = "Ready";

stateName[2]                    = "Fire";
stateTransitionOnTimeout[2]     = "Smoke";
stateTimeoutValue[2]            = 0.0;
stateFire[2]                    = true;
stateAllowImageChange[2]        = false;
stateSequence[2]                = "Fire";
stateScript[2]                  = "onFire";
stateWaitForTimeout[2] = true;
stateEmitter[2] = MachineGunFlashEmitter;
stateEmitterTime[2] = 0.05;
stateEmitterNode[2] = "muzzleNode";
stateSound[2] = MachineGunShot1Sound;
stateEjectShell[2]       = true;

stateName[3] = "Smoke";
stateEmitter[3] = MachineGunSmokeEmitter;
stateEmitterTime[3] = 0.05;
stateEmitterNode[3] = "muzzleNode";
stateTimeoutValue[3]            = 0.01;
stateTransitionOnTimeout[3]     = "Reload";

stateName[4] = "Reload";
stateSequence[4]                = "Reload";
stateTransitionOnTriggerDown[4]  = "Fire";
stateTransitionOnTriggerUp[4]     = "Ready";
stateSequence[4] = "Ready";

};
« Last Edit: June 23, 2010, 04:17:49 PM by Uxie »

Before you even dream of doing that.
Redo that model.
« Last Edit: June 23, 2010, 11:46:32 AM by MrBloxxer »

Remove state 4 entirely and change state 3's transition to Ready.

Before you even dream of doing that.
Redo that model.
It's not done.
Remove state 4 entirely and change state 3's transition to Ready.
Works. Thank you.

I think the model is cool :D

Looks cool.

Except that it looks like a sniper.

or is it

MACHINE GUN SNIPER? :O

Before you even dream of doing that.
Redo that model.

No the model looks nice