Page 1 of 1

Custom weapon won't charge. [Solved]

Posted: Wed Jul 02, 2014 4:34 pm
by commanderawesome
Am I doing something wrong? It works perfectly fine except it doesn't charge.

Here's the odf:
Hidden/Spoiler:
[code][WeaponClass]
ClassParent = "com_weap_inf_rifle"
GeometryName = "rep_weap_inf_rifle.msh"

[Properties]
GeometryName = "rep_weap_inf_rifle"
HighResGeometry = "rep_1st_weap_inf_rifle"
OrdnanceName = "rep_weap_inf_rifle_ord"
FirePointName = "hp_fire"

//***********************************************
//*********** WEAPON PERFORMANCE VALUES *********
//***********************************************

RoundsPerClip = "42"
ReloadTime = "2.0"
ShotDelay = "0.6"
TriggerSingle = "1"

SalvoCount = "3"
ShotsPerSalvo = "1"
SalvoDelay = "0.2"
InitialSalvoDelay = "0.0"
SalvoTime = "0.0"

NextCharge = 0.33

ShotsPerSalvo = 1
OrdnanceName = "rep_weap_inf_heavyrifle_ord_med"

NextCharge = 0.95

ShotsPerSalvo = 1
OrdnanceName = "rep_weap_inf_heavyrifle_ord_high"

//******************************************************
//*************** SOUND ****************
//******************************************************

MuzzleFlash = "small_muzzle_flash"
FlashColor = "80 80 255 255"
FlashLength = 0.025
FlashColor = "100 100 255 255"
FlashLength = 0.025
FlashLightColor = "220 220 255 175"
FlashLightRadius = "2.0"
FlashLightDuration = "0.25"
Discharge = "small_smoke_effect"


FireSound = "rep_weap_inf_rifle_fire"
ReloadSound = "com_weap_inf_reload_med"
ChangeModeSound = "com_weap_inf_equip_med"
FireEmptySound = "com_weap_inf_ammo_empty"
WeaponChangeSound = "com_weap_inf_equip_med"
JumpSound = "com_weap_inf_rifle_mvt_jump"
LandSound = "com_weap_inf_rifle_mvt_land"
RollSound = "com_weap_inf_rifle_mvt_roll"
//ProneSound = "com_weap_inf_rifle_mvt_lie"
SquatSound = "com_weap_inf_rifle_mvt_squat"
//StandSound = "com_weap_inf_rifle_mvt_getup"[/code]
And those of it's ammo:
Regular:
Hidden/Spoiler:
[code][OrdnanceClass]
ClassParent = "com_weap_inf_rifle_ord"

[Properties]

LaserTexture = "com_sfx_laser_blue"
LaserGlowColor = "92 136 250 100"
LightColor = "92 136 250 100"

Velocity = "150.0"
MaxDamage = "40.0"[/code]
Medium:
Hidden/Spoiler:
[code][OrdnanceClass]
ClassParent = "com_weap_inf_rifle_ord"

[Properties]

LaserTexture = "com_sfx_laser_blue"
LaserGlowColor = "92 136 250 100"
LightColor = "92 136 250 100"


MaxDamage = "105.0"[/code]
Heavy:
Hidden/Spoiler:
[code][OrdnanceClass]
ClassParent = "com_weap_inf_rifle_ord"

[Properties]

LaserTexture = "com_sfx_laser_blue"
LaserGlowColor = "92 136 250 100"
LightColor = "92 136 250 100"


MaxDamage = "315.0"

[/code]

Re: Custom weapon won't charge.

Posted: Wed Jul 02, 2014 6:56 pm
by AQT
You need to specify a non-negative value for the MaxPressedTime parameter in the main ODF. It's for how long you hold the fire button until it fully charges.

Re: Custom weapon won't charge.

Posted: Wed Jul 02, 2014 8:42 pm
by commanderawesome
Ok, now it charges, but the shots per salvo doesn't change.

Re: Custom weapon won't charge.

Posted: Wed Jul 02, 2014 8:46 pm
by AQT
That's because you haven't changed them.

Re: Custom weapon won't charge.

Posted: Wed Jul 02, 2014 8:50 pm
by commanderawesome
NextCharge = 0.33

ShotsPerSalvo = 1
OrdnanceName = "rep_weap_inf_heavyrifle_ord_med"

NextCharge = 0.95

ShotsPerSalvo = 1
OrdnanceName = "rep_weap_inf_heavyrifle_ord_high"
That was in the original odf. I want a 3-shot burst when firing normally, but one shot when charged.

Re: Custom weapon won't charge.

Posted: Wed Jul 02, 2014 8:53 pm
by AQT
commanderawesome wrote:SalvoCount = "3"
ShotsPerSalvo = "1"
Then change the SalvoCount instead. Setting the ShotsPerSalvo at 1 again won't do anything...

Re: Custom weapon won't charge.

Posted: Thu Jul 03, 2014 2:47 pm
by commanderawesome
It works! Thanks! :)