Author Topic: Weapon Rate of fire  (Read 785 times)

Im making my first Model and editing the defualt Gun script to fit it


Where would i find the line that determines the Rate of fire/Automatic fire?

The reload sequence.

Which would probably be sequence 9.

The reload sequence.

Which would probably be sequence 9.

Im sorry that didnt help :[

Here ill give you the portion of the script Put the one/s that i need to modify in Bold

Quote
projectileShapeName = "add-ons/weapon_gun/bullet.dts";
   directDamage        = 30;
   directDamageType    = $DamageType::PPSH;
   radiusDamageType    = $DamageType::PPSH;

   brickExplosionRadius = 0;
   brickExplosionImpact = true;          //destroy a brick if we hit it directly?
   brickExplosionForce  = 10;
   brickExplosionMaxVolume = 1;          //max volume of bricks that we can destroy
   brickExplosionMaxVolumeFloati ng = 2;  //max volume of bricks that we can destroy if they aren't connected to the ground

   impactImpulse        = 400;
   verticalImpulse     = 400;
   explosion           = PPSHExplosion;
   particleEmitter     = ""; //bulletTrailEmitter;

   muzzleVelocity      = 90;
   velInheritFactor    = 1;

   armingDelay         = 00;
   lifetime            = 4000;
   fadeDelay           = 3500;
   bounceElasticity    = 0.5;
   bounceFriction      = 0.20;
   isBallistic         = false;
   gravityMod = 0.0;

   hasLight    = false;
   lightRadius = 3.0;
   lightColor  = "0 0 0.5";

   uiName = "PPSH Bullet";

Im sorry that didnt help :[

Here ill give you the portion of the script Put the one/s that i need to modify in Bold

It's not in that part. The bottom where is has stuff about states.

Ill look there, i just figured it would be around there since the Dmg was in that spot

I am unable yo find this Line of code


Anyone know how to show it?


Quote
stateName[0]                     = "Activate";
   stateTimeoutValue[0]             = 0.15;
   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.14;
   stateFire[2]                    = true;
   stateAllowImageChange[2]        = false;
   stateSequence[2]                = "Fire";
   stateScript[2]                  = "onFire";
   stateWaitForTimeout[2]         = true;
   stateEmitter[2]               = PPSHFlashEmitter;
   stateEmitterTime[2]            = 0.05;
   stateEmitterNode[2]            = "muzzleNode";
   stateSound[2]               = PPSHShot1Sound;
   stateEjectShell[2]       = true;

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

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



Is it in there?
« Last Edit: July 14, 2010, 06:40:55 PM by Obibital »

Completely remove sequence four.

Completely remove sequence four.

Thanks, ill see what that does

   stateTransitionOnTimeout[3]     = "Reload";

Remove that too

Is that whats causing the "take out item" noise every time i fire?

But since this is going well, what would i edit to make the bullets fire at a faster rate?



The default Bow basically functions as an automatic weapon (fires by holding down the button), so all you'd have to do with that one is reduce the timeout instead of rearranging every single state.