Page 1 of 1

Game freezes from a weapon [Solved]

Posted: Wed Jun 03, 2009 2:51 pm
by 501st_commander
Ok, i have this one unit and when i change the main weapon the game freezes. Is there a way to fix this? I'm not sure what files to post so here are every file i have for that unit and the weapon odf's i made,

odf's,

rep_inf_default_recon:
Hidden/Spoiler:
[GameObjectClass]
ClassParent = "rep_inf_default"

[Properties]
UnitType = "scout"

PointsToUnlock = 16

ScanningRange = 30.0
TransmitRange = 300.0

MaxSpeed = 8.0
MaxStrafeSpeed = 6.0

WEAPONSECTION = 1
WeaponName = "rep_weap_inf_reconrifle"
WeaponAmmo = 10

WEAPONSECTION = 2
WeaponName = "ak47"
WeaponAmmo = 0

WEAPONSECTION = 3
WeaponName = "rep_weap_inf_haywiredetonator"
WeaponAmmo = 10
WeaponChannel = 1

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

WEAPONSECTION = 5
WeaponName = "rep_weap_inf_mine_dispenser"
WeaponAmmo = 10
WeaponChannel = 1

WEAPONSECTION = 6
WeaponName = "rep_weap_Pulse_Grenade"
WeaponAmmo = 10
WeaponChannel = 1

WEAPONSECTION = 6
WeaponName = "rep_weap_award_rifle"
WeaponAmmo = 10


VOUnitType = 121
rep_inf_recon:
Hidden/Spoiler:
[GameObjectClass]
ClassParent = "rep_inf_default_recon"

[Properties]
GeometryName = "rep_inf_atrt_driver"
GeometryLowRes = "rep_inf_feluciatrooper_low1"
FirstPerson = "REP\repatrtdrv;rep_1st_ATRT"
rep_weap_inf_reconrifle:
Hidden/Spoiler:
[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_reconrifle_ord"
FirePointName = "hp_fire"

//******************************************************
//*************** 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"
rep_weap_inf_reconrifle_ord
Hidden/Spoiler:
[OrdnanceClass]
ClassParent = "com_weap_inf_rifle_ord"

[Properties]

MaxDamage = "300.0"

LaserTexture = "com_sfx_laser_yellow"
LaserGlowColor = "42 249 42 100"
LightColor = "92 136 250 100"
LaserLength = "8"
LaserWidth = "0.50"
LightRadius = "2"
ak47:
Hidden/Spoiler:
[WeaponClass]
ClassParent = "com_weap_inf_rifle"
GeometryName = "ak47.msh"

[Properties]
GeometryName = "ak47"
HighResGeometry = "ak47"
OrdnanceName = "ak47_ord"
FirePointName = "hp_fire"

//******************************************************
//*************** 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_chaingun_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"
ak47_ord:
Hidden/Spoiler:
[OrdnanceClass]
ClassParent = "com_weap_inf_rifle_ord"

[Properties]

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

and the rep_inf_recon.REQ
Hidden/Spoiler:
ucft
{
REQN
{
"class"
"rep_inf_recon"
}
REQN
{
"texture"
"imp_inf_snowtrooper_pack"
}
}
Is there anything wrong?

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 2:58 pm
by sampip

Code: Select all

WEAPONSECTION = 6
WeaponName = "rep_weap_Pulse_Grenade"
WeaponAmmo = 10
WeaponChannel = 1

WEAPONSECTION = 6
WeaponName = "rep_weap_award_rifle"
WeaponAmmo = 10
you have to weapon section 6's here. that could be an error....

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 3:10 pm
by 501st_commander
no more freezes from a weapon but i cant use the ak47.... when i switch weapons it goes to the award and i try to switch again it dosen't...

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 3:54 pm
by YaNkFaN
both the ak-47 and recon rifle use com_weap_inf_rifle as a class parent iff you have the award rifle unlocked, it will pick one in this case the recon rifle to overwtrite with the award rifle. I don't have the code on me (in school) but i will post it when I get home to remove the switching ability (from normal to award) for weapons. If anyone wants to save me the time just post it it's somethign like scoreformedaltype = -1 or something liek that

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 4:30 pm
by 501st_commander
ok, i'll wait untill you get out of.... school?
thanks for your help btw

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 4:54 pm
by MercuryNoodles
That -1 thing is something I made up one day. It just disables the parameter by using an invalid value. As far as I know it can be any number not associated with an award.

There are three parameters; one to tell the game which award it's to associate with the weapon, one to lock out a weapon, and one to unlock a weapon. (Off the top of my head they are ScoresForMedalsType, MedalsTypeToLock, and MedalsTypeToUnlock.) Really, I'd recommend making a weapon odf that has no parent and just exclude those odf parameters, unless you're doing a lot of weapon modding for say a large sides mod. It involves more copy/paste work, but it'll cut the lock/unlock problem out without disabling the award weapon elsewhere, should it be needed.

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 5:14 pm
by YaNkFaN
yea these are the lines and it's easier just to add this instead imo

ScoreForMedalsType = -1
MedalsTypeToLock = -1

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 7:20 pm
by 501st_commander
so where do i put that?

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 7:23 pm
by AQT
Under [Properties] of your weapons' .odf.

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 7:26 pm
by 501st_commander
[weapon]_ord?

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 7:30 pm
by AQT
Nope, just [weapon].

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 7:30 pm
by YaNkFaN
nope just weapon right under this line here's mine for example

it's called rep_weap_inf_gauss.odf

[WeaponClass]
ClassLabel = "cannon"
GeometryName = "sfor_republic_carbine"

[Properties]

AnimationBank = "rifle"

ScoreForMedalsType = -1
MedalsTypeToLock = -1

GeometryName = "sfor_republic_carbine"
HighResGeometry = "sfor_republic_carbine"
OrdnanceName = "rep_weap_inf_gauss_ord"
FirePointName = "hp_fire"
HUDTag = "sfor_republic_carbine"

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 7:35 pm
by 501st_commander
ok, i'll try that and report back, thanks.

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 7:37 pm
by AQT
It doesn't have to be right exactly there. As long as it is under [Properties] it will work.

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 7:44 pm
by 501st_commander
thanks YaNk and AQT, you've saved me. It works! :thumbs:

mods this can be locked, if you like to.

Re: Game freezes from a weapon

Posted: Wed Jun 03, 2009 8:08 pm
by YaNkFaN
:wink: glad i could help