Page 1 of 1

Unable to Switch Weapons

Posted: Tue Jul 14, 2009 1:59 pm
by Fierfek
Okay, so I have a unit with a shotgun and pistol. In the spawn menu, it only says pistol, but when I spawn, he starts with the shotgun. Then, when I switch to pistol, I can't switch back to shotgun.
Help?

Re: Unable to Switch Weapons

Posted: Tue Jul 14, 2009 3:36 pm
by AQT
One of the awards weapons glitch this is. Make sure your weapons do not inherit from a ClassParent.

Re: Unable to Switch Weapons

Posted: Tue Jul 14, 2009 3:39 pm
by Labj
Han Solo has the same trouble in the XBox

Re: Unable to Switch Weapons

Posted: Tue Jul 14, 2009 3:42 pm
by AQT
And the PC and probably other platforms too. This problem will only occur when you have/earn certain award weapons.

Re: Unable to Switch Weapons

Posted: Tue Jul 14, 2009 3:47 pm
by Fierfek
AQT wrote:One of the awards weapons glitch this is. Make sure your weapons do not inherit from a ClassParent.
Don't they need to inherit from the parent to function properly? How would I change that?
This is the award shotgun and jango's pistol.

Re: Unable to Switch Weapons

Posted: Tue Jul 14, 2009 4:12 pm
by Xavious
You can't set up the award shotgun like a normal weapon. If you do, you will only be able to use it if you have obtained the award shotgun in your game profile.

Re: Unable to Switch Weapons

Posted: Tue Jul 14, 2009 4:18 pm
by Fierfek
Xavious wrote:You can't set up the award shotgun like a normal weapon. If you do, you will only be able to use it if you have obtained the award shotgun in your game profile.
How do I make it a normal weapon, like how the precision pistols were made into jango's pistols? Do I need to delete this line in the award shotgun odf?
Hidden/Spoiler:
MedalsTypeToUnlock = 5
ScoreForMedalsType = 5

Re: Unable to Switch Weapons

Posted: Tue Jul 14, 2009 4:29 pm
by Xavious
Try it. I'm not entirely sure, because I've never really messed with the awards weapons.

Re: Unable to Switch Weapons

Posted: Tue Jul 14, 2009 4:56 pm
by AQT
Fierfek wrote:
AQT wrote:One of the awards weapons glitch this is. Make sure your weapons do not inherit from a ClassParent.
Don't they need to inherit from the parent to function properly? How would I change that?
This is the award shotgun and jango's pistol.
Your weapon doesn't need to inherit from any ClassParent. As long as it has a ClassLabel and has all the necessary ODF parameters, it will work. Here's an example of a ClassParent-less weapon:
Hidden/Spoiler:
[WeaponClass]
ClassLabel = "cannon"
GeometryName = "all_weap_inf_rifle.msh"

[Properties]
GeometryName = "a280"
HighResGeometry = "a280"
OrdnanceName = "all_weap_inf_rifle_ord"
FirePointName = "hp_fire"

AnimationBank = "rifle"

//***********************************************
//************* TARGET & RANGE VALUES **********
//***********************************************

TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "0"
TargetBuilding = "0"

MinRange = "0"
OptimalRange = "16"
MaxRange = "64"

LockOnRange = "40.0"
LockTime = "0.4"
lockOnAngle = "1.0"

ZoomMin = "2.5"
ZoomMax = "2.5"
ZoomRate = "0.0"

YawSpread = "0.225"
PitchSpread = "0.225"

SpreadPerShot = "0.75"
SpreadRecoverRate = "2.0"
SpreadThreshold = "3.0"
SpreadLimit = "1.25"

StandStillSpread = "0.0"
StandMoveSpread = "0.0"
CrouchStillSpread = "0.0"
CrouchMoveSpread = "0.0"
ProneStillSpread = "0.0"
ProneMoveSpread = "0.0"

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

RoundsPerClip = "50"
ReloadTime = "1.5"
ShotDelay = "0.2"
TriggerSingle = "0"

DisplayRefire = "0"

SalvoCount = "1"
SalvoDelay = "0.0"
InitialSalvoDelay = "0.0"
SalvoTime = "0.0"

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

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

RecoilLengthLight = "0.1"
RecoilLengthHeavy = "0.1"
RecoilStrengthLight = "1.0"
RecoilStrengthHeavy = "0.2"
RecoilDecayLight = "0.0"
RecoilDecayHeavy = "0.0"

FireSound = "all_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"