Hi!
I've created a unit with a machine gun and a missile launcher in one turret. The machine gun is the primary weapon and used against infantry, the launcher is the secondary weapon and used to destroy vehicles and structures. The problem: It works fine when the primary weapon is used, if the missile launcher is firing, the turret starts with the "idle scan" animation. That looks really ugly...
The code parts (only relevant parts):
Code:
<ModelConditionState
ParseCondStateType="PARSE_DEFAULT">
<Model
Name="AUJeep" />
<WeaponFireFXBone
WeaponSlotID="1"
WeaponSlotType="PRIMARY_WEAPON"
BoneName="WEAPON01" />
<WeaponRecoilBone
WeaponSlotID="1"
WeaponSlotType="PRIMARY_WEAPON"
BoneName="WEAPON01" />
<WeaponMuzzleFlash
WeaponSlotID="1"
WeaponSlotType="PRIMARY_WEAPON"
BoneName="WEAPON01" />
<WeaponLaunchBone
WeaponSlotID="1"
WeaponSlotType="PRIMARY_WEAPON"
BoneName="WEAPON01" />
<WeaponFireFXBone
WeaponSlotID="1"
WeaponSlotType="SECONDARY_WEAPON"
BoneName="WEAPON02" />
<WeaponLaunchBone
WeaponSlotID="1"
WeaponSlotType="SECONDARY_WEAPON"
BoneName="WEAPON02"/>
<Turret
TurretNameKey="Turret"
TurretPitch="Barrel"
TurretID="1" />
</ModelConditionState>
<!--.......-->
<!--other unit stuff-->
<!--.......-->
<Behaviors>
<WeaponSetUpdate
id="ModuleTag_WeaponSetUpdate">
<WeaponSlotTurret
ID="1"
AllowInterleavedFiring="true"
InterleavedStyle="INTERLEAVE_FIRST_AVAILABLE"
WeaponChoiceCriteria="PREFER_MOST_DAMAGE">
<Weapon
Ordering="PRIMARY_WEAPON"
Template="MachineGun" />
<Weapon
Ordering="SECONDARY_WEAPON"
Template="MissileLauncher" />
<TurretSettings
TurretTurnRate="200"
TurretPitchRate="200"
AllowsPitch="true"
MinimumPitch="-15d"
MinIdleScanTime="1.0s"
MaxIdleScanTime="5.0s"
MinIdleScanAngle="0.0"
MaxIdleScanAngle="90.0"
ControlledWeaponSlots="PRIMARY_WEAPON SECONDARY_WEAPON">
<TurretAITargetChooserData
CanAcquireDynamicIfAssignedOutOfRange="true" />
</TurretSettings>
</WeaponSlotTurret>
</WeaponSetUpdate>
<!--other Behaviors-->
</Behaviors>
<AI>
<AIUpdate
id="ModuleTag_AI"
AutoAcquireEnemiesWhenIdle="YES">
<UnitAITargetChooserData
SympathyRange="100.0"
RotateToTargetWhenAiming="false" />
</AIUpdate>
</AI>
Which code parts must be changed to avoid the turret's idle animation while using the secondary weapon?
Greets
G.S.