first you should add the secondary weapon fire bone, you can use the same as primary, then look at this:
WeaponSet
Conditions = NONE
Weapon = PRIMARY RaptorJetMissileWeapon
Weapon = SECONDARY raptor_Vulcan ;(for example)
AutoChooseSources = PRIMARY FROM_SCRIPT FROM_AI DEFAULT_SWITCH_WEAPON
AutoChooseSources = SECONDARY FROM_SCRIPT FROM_AI
WeaponLockSharedAcrossSets = Yes ;
End
You should made a secondary weapon set for your raptor, then edit commandbutton.ini, add:
CommandButton Command_AmericaRaptorSwitchToMissiles
Command = SWITCH_WEAPON
WeaponSlot = PRIMARY
Options = CHECK_LIKE OK_FOR_MULTI_SELECT
TextLabel = CONTROLBAR:RangerMachineGun
ButtonImage = SSMachineGun ;(image you want)
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipSwitchToRangerMachineGun
End
CommandButton Command_AmericaRaptorSwitchToVulcan
Command = SWITCH_WEAPON
WeaponSlot = SECONDARY
Options = CHECK_LIKE OK_FOR_MULTI_SELECT NEED_UPGRADE
Upgrade = Upgrade_AmericaRangerFlashBangGrenade
TextLabel = CONTROLBAR:FlashBangGrenadeMode
ButtonImage = SSFlashbang
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipSwitchToUSAFlashBang
End
then add these two command to commandset of your raptor.
it's complate
|