class m16Fire extends InstantFire;
#EXEC OBJ LOAD FILE=Csutsounds.uax
var float LastFireTime;
var float ClickTime;
var bool Crouched;
function InitEffects()
{
Super.InitEffects();
if ( FlashEmitter != None )
Weapon.AttachToBone(FlashEmitter, 'tip');
}
function FlashMuzzleFlash()
{
local rotator r;
r.Roll = Rand(65536);
Weapon.SetBoneRotation('Bone_Flash', r, 0, 1.f);
Super.FlashMuzzleFlash();
}
event IfCrouched()
{
local Pawn P;
P = xPawn(Owner);
if (Instigator.bIsCrouched)
{
Spread = 10.000000;
}
else
{
Spread = Default.Spread;
}
}
simulated function bool AllowFire()
{
if (Super.AllowFire())
return true;
else
{
if ( (PlayerController(Instigator.Controller) != None) && (Level.TimeSeconds > ClickTime) )
{
Instigator.PlaySound(Sound'WeaponSounds.P1Reload5');
ClickTime = Level.TimeSeconds + 0.25;
}
return false;
}
}
function StartBerserk()
{
DamageMin = default.DamageMin * 1.33;
DamageMax = default.DamageMax * 1.33;
}
function StopBerserk()
{
DamageMin = default.DamageMin;
DamageMax = default.DamageMax;
}
function StartSuperBerserk()
{
FireRate = default.FireRate * 1.5/Level.GRI.WeaponBerserk;
FireAnimRate = default.FireAnimRate * 0.667 * Level.GRI.WeaponBerserk;
DamageMin = default.DamageMin * 1.5;
DamageMax = default.DamageMax * 1.5;
if (AssaultRifle(Weapon) != None && AssaultRifle(Weapon).bDualMode)
FireRate *= 0.55;
}
defaultproperties
{
DamageType=XWeapons.DamTypeAssaultBullet
DamageMin=45
DamageMax=45
Momentum=0.000000
bPawnRapidFireAnim=True
FireLoopAnim=
FireEndAnim=
FireSound=Csutsounds.M16fire
FireForce="AssaultRifleFire"
FireRate=0.300000
bWaitForRelease=True
AmmoClass=Csut.M16Ammo
AmmoPerFire=1
ShakeRotMag=(X=50.000000,Y=50.000000,Z=50.000000)
ShakeRotRate=(X=10000.000000,Y=10000.000000,Z=10000.000000)
ShakeRotTime=2.000000
ShakeOffsetMag=(X=1.000000,Y=1.000000,Z=1.000000)
ShakeOffsetRate=(X=1000.000000,Y=1000.000000,Z=1000.000000)
ShakeOffsetTime=2.000000
BotRefireRate=0.990000
FlashEmitterClass=XEffects.AssaultMuzFlash1st
aimerror=80000.000000
Spread=0.020000
SpreadStyle=SS_Random
}
This is my code rewrite it so it would work PLS cant understand my problem . . .
I checked and spread is the right object "aimerror=80000.000000" and im shooting very accurate (-8
is this what u ment ?
__________________________________-
class m16Fire extends InstantFire;
#EXEC OBJ LOAD FILE=Csutsounds.uax
var float LastFireTime;
var float ClickTime;
var bool Crouched;
function InitEffects()
{
Super.InitEffects();
if ( FlashEmitter != None )
Weapon.AttachToBone(FlashEmitter, 'tip');
}
function HandleFireMode()
{
bWaitForRelease=false;
if(FireCount>1)
{
if(!Instigator.Controller.IsA('PlayerController'))
{
bCantShoot=true;
SetTimer(0.3,false);
}
else
bWaitForRelease=true;
}
}
function Timer()
{
bCantShoot=false;
}
function FlashMuzzleFlash()
{
local rotator r;
r.Roll = Rand(65536);
Weapon.SetBoneRotation('Bone_Flash', r, 0, 1.f);
Super.FlashMuzzleFlash();
}
event IfCrouched()
{
local Pawn P;
P = xPawn(Owner);
if (Instigator.bIsCrouched)
{
Spread = 10.000000;
}
else
{
Spread = Default.Spread;
}
}
simulated function bool AllowFire()
{
if(bCantShoot)
return false;
if (Super.AllowFire())
return true;
else
{
if ( (PlayerController(Instigator.Controller) != None) && (Level.TimeSeconds > ClickTime) )
{
Instigator.PlaySound(Sound'WeaponSounds.P1Reload5');
ClickTime = Level.TimeSeconds + 0.25;
}
return false;
}
return super.AllowFire();
}
function StartBerserk()
{
DamageMin = default.DamageMin * 1.33;
DamageMax = default.DamageMax * 1.33;
}
function StopBerserk()
{
DamageMin = default.DamageMin;
DamageMax = default.DamageMax;
}
function StartSuperBerserk()
{
FireRate = default.FireRate * 1.5/Level.GRI.WeaponBerserk;
FireAnimRate = default.FireAnimRate * 0.667 * Level.GRI.WeaponBerserk;
DamageMin = default.DamageMin * 1.5;
DamageMax = default.DamageMax * 1.5;
if (AssaultRifle(Weapon) != None && AssaultRifle(Weapon).bDualMode)
FireRate *= 0.55;
}
defaultproperties
{
DamageType=XWeapons.DamTypeAssaultBullet
DamageMin=45
DamageMax=45
Momentum=0.000000
bPawnRapidFireAnim=True
FireLoopAnim=
FireEndAnim=
FireSound=Csutsounds.M16fire
FireForce="AssaultRifleFire"
FireRate=0.300000
bWaitForRelease=True
AmmoClass=Csut.M16Ammo
AmmoPerFire=1
ShakeRotMag=(X=50.000000,Y=50.000000,Z=50.000000)
ShakeRotRate=(X=10000.000000,Y=10000.000000,Z=10000.000000)
ShakeRotTime=2.000000
ShakeOffsetMag=(X=1.000000,Y=1.000000,Z=1.000000)
ShakeOffsetRate=(X=1000.000000,Y=1000.000000,Z=1000.000000)
ShakeOffsetTime=2.000000
BotRefireRate=0.990000
FlashEmitterClass=XEffects.AssaultMuzFlash1st
aimerror=80000.000000
Spread=0.020000
SpreadStyle=SS_Random
}
____________________________________________________
Because if yes im getting this error . . .
"Bad or missing expression in If. M16Fire.uc (Line 62)"
And any idea how i can change my fire rate from brust to semi with key assaign ?? PLS im so thankfull its the first place im actually getting answers
so be very glad if u can help me out here looking a month allready for an answer