Page 1 of 1

Award Weapon Issue [Solved]

Posted: Mon Nov 24, 2014 3:04 pm
by Hill400
Hello,
I've been having an issue that I think has to do with award weapons. I created a new side with a standard weapon but no award weapon, and when I try to switch the weapon the weapon the screen freezes (I have frenzy on legendary). I tried adding "ScoreForMedalsType = -1" and "MedalsTypeToUnlock = -1" (without out quotation marks) but it hasn't helped.

Here is the sides's code:
Hidden/Spoiler:
[code][GameObjectClass]
ClassParent = "rep_inf_default"


[Properties]
MaxHealth = 450.0

PointsToUnlock = 8

MaxSpeed = 5.9 // base forward speed
MaxStrafeSpeed = 4.8 // base right/left speed

WEAPONSECTION = 1
WeaponName = "rep_weap_inf_rifle"
WeaponAmmo = 6

WEAPONSECTION = 2
WeaponName = "rep_weap_inf_thermaldetonator"
WeaponAmmo = 4
WeaponChannel = 1

WEAPONSECTION = 3
WeaponName = "rep_weap_inf_detpack"
WeaponAmmo = 3
WeaponChannel = 1


VOUnitType = 121[/code]
and here's the weapon's code:
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"

ScoreForMedalsType = -1
MedalsTypeToUnlock = -1

//******************************************************
//*************** 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]
Thanks for anyone's help!

Re: Award Weapon Issue

Posted: Mon Nov 24, 2014 3:58 pm
by AQT
Remove all the medal related lines, and make sure your weapon ODF doesn't inherit from com_weap_inf_rifle.odf.

Re: Award Weapon Issue

Posted: Mon Nov 24, 2014 9:02 pm
by Hill400
I removed all of the "medal related lines" and made it inherit from a copy of "com_weap_inf_rifle" without any medal references and the problem still persists. Should I make a new parent class from scratch?

Re: Award Weapon Issue

Posted: Mon Nov 24, 2014 11:08 pm
by jedimoose32
When you say you used ScoreForMedalsType and MedalsTypeToUnlock =-1, do you mean you put those in the unit's weapon odf, or in the parent odf? Personally my strategy for getting rid of award weapons is to make all of the common parents have a -1 value for these properties. Never have any problems with them.

Re: Award Weapon Issue

Posted: Tue Nov 25, 2014 12:09 am
by JimmyAngler
I had the same problem, BF2 doesn't like anything with the word "award" in its odf for some reason. I ended up changing it to elite or something like that.

Re: Award Weapon Issue

Posted: Tue Nov 25, 2014 12:16 am
by jedimoose32
If what I said doesn't work then post your BFront2 error log. That's usually really helpful when it comes to solving weapon problems.

Re: Award Weapon Issue

Posted: Wed Nov 26, 2014 6:37 pm
by Hill400
Thanks jedimoose, it worked. I was always editing the child class when I should have been editing the parent class.