Help - Search - Members - Calendar
Full Version: Modding Help
SWR Productions Forum > Game Modding and Development > Generals/Zerohour Modding
TheViking92
Hi guys!

How do I make a unit not shoot all its weapons at the same time?

I am modifying a helicopter and it has Missiles and RocketPod Upgrade.
When I send him to attack, he fires his rockets with the missiles at the same time ...

What should I do?
Omeka88
depend on the result you want

anyway some option:

1) set the weapon set like this :

WeaponSet
Conditions = NONE
Weapon = PRIMARY Minigun
Weapon = SECONDARY Missiles
PreferredAgainst = SECONDARY STRUCTURE , force the unit to use missile only vs bulding , but use the minigin during the reload time
End

2) A manual Weapon Switc like the scud launcer\nuke cannon

need more unit management but force unit to use only 1 weapon

3) Like The America Comance roket pod , like metod 2 need more unit management
TheViking92
QUOTE (Omeka88 @ 25 Apr 2018, 11:10) *
depend on the result you want

anyway some option:

1) set the weapon set like this :

WeaponSet
Conditions = NONE
Weapon = PRIMARY Minigun
Weapon = SECONDARY Missiles
PreferredAgainst = SECONDARY STRUCTURE , force the unit to use missile only vs bulding , but use the minigin during the reload time
End

2) A manual Weapon Switc like the scud launcer\nuke cannon

need more unit management but force unit to use only 1 weapon

3) Like The America Comance roket pod , like metod 2 need more unit management


I have it configured in the following way:
WeaponSet
Conditions = None
Weapon = PRIMARY ApacheHellfireMissileWeapon
PreferredAgainst = PRIMARY VEHICLE
End

WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY ApacheHellfireMissileWeaponUP
PreferredAgainst = PRIMARY VEHICLE
Weapon = TERTIARY CobraRocketPodWeapon
AutoChooseSources = TERTIARY NONE
End
Omeka88
WeaponSet
Conditions = None
Weapon = PRIMARY ApacheHellfireMissileWeapon
PreferredAgainst = PRIMARY VEHICLE
End

in this one don't need PreferredAgainst since is only 1 weapon.

the PLAYER_UPGRADE one is fine , if you want ONLY MANUAL fire like the comance.

now you only need to add the button for use the TERTIARY weapon

like this one (change Upgrade if you use a custom one) , and the commandset
CODE
CommandButton Command_AmericaVehicleComancheFireRocketPods
  Command                 = FIRE_WEAPON
  WeaponSlot              = TERTIARY
  Options                 = OK_FOR_MULTI_SELECT NEED_UPGRADE NEED_TARGET_POS ; fires at pos, not obj
  Upgrade                 = Upgrade_ComancheRocketPods
  TextLabel               = CONTROLBAR:FireRocketPods
  ButtonImage             = SSRocketAttack
  ButtonBorderType        = ACTION; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:ToolTipUSAFireRocketPods
  RadiusCursorType        = ATTACK_SCATTER_AREA
  InvalidCursorName       = GenericInvalid
  UnitSpecificSound       = ComancheVoiceModeRocketPods
End
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.