3 New Notifications

New Badge Earned
Get 1K upvotes on your post
Life choices of my cat
Earned 210

Drag Images here or Browse from your computer.

Trending Posts
Sorted by Newest First
S
Strelec-zmeya 12.11.21 06:56 pm

Adding new weapons to vehicles (Battlefield 2)

Hello everybody!
I want to add, for example, another type of missile to the Mi-24. But when I write everything I need to in the Tweak file, nothing is added to the game. Why? Due to the fact that the helicopter has these missiles physically absent, that is, not drawn? After all, I even used the coordinates of the existing missiles for the suspension of new ones. What am I doing wrong?
17 Comments
Sort by:
Z
Zuko_42 12.11.21

Strelec-zmeya
Well, firstly, a full description of GenericFireArm (the weapon itself) and GenericProjectile should be written.
Secondly, this weapon must be declared in the RotationBundle or in the PlayerControlObject, or in the .tweak or in the .con file.Thirdly
, create a new Bundle - the place where the projectile will fly from, declare it in ObjectTemplate.fire.addBarrelName, and add as ObjectTemplate.addTemplate in GenericFireArm
Bundle TemplateObjectTemplate.create Bundle xpak_hind_new_missile_barrel
ObjectTemplate.createdInEditor 1
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 0
rem -------------------------- -----------
there are different visuals when firing
rem -------------------------------- -----
Fourth, try increasing the GenericFireArm itemIndex by 1.
It seems like that should be enough.

S
Strelec-zmeya 12.11.21

_Zuko_42_
Thank you. Figured out how to add rockets. Added TV missiles (agm114_hellfire_tv) for co-pilot. There it was necessary to change the sight index of the machine gun to 26 and add a few lines adding these missiles, camera and aiming:

ObjectTemplate.addTemplate AIX_Mi24_CoGunner_HellFireLauncherTV
ObjectTemplate.setPosition 1.76226 / -1.12142 / 1.3082
ObjectTemplate / 1599Dotation
-1
ObjectTemplate.setPosition 1.76226 / -1.12142 / 1.3082
ObjectTemplate.setRotation -1.7 / 15 / -0.0999999

Everything works now. But there is one bug - when you switch to missiles (this is RMB), they fire. And the widowmaker's homing missiles seem to be firing. Only in this case TV missiles are consumed, and not another pilot.
All changes were made in the helicopter Tweak file.
By the way, I did not assign Bundle and ObjectTemplate.fire.addBarrelName to TV rockets.

To make it clearer, I will write a little background:
Modification of Skynet.
Helicopter AIX_Mi24
In older versions of this mod, this helicopter has the following weapons:
Main pilot machine gun
Hydra unguided air-to-surface missiles for main pilot
Air-to-air missiles for main pilot
Air-to-ground missiles for the main pilot
Machine gun-turret for the co-pilot.

In the new version of the mod, they wrote that they added missiles for the co-pilot TV, but it turned out that they simply replaced the main pilot's homing missiles with TV, taking into account the same location of their "physically"
I decided to just add them, but not bother with where they will fly from. I copied the entire text of the TV missiles and guidance systems for them and pasted into my helicopter. It didn't work out. It turned out that I had not added them (I think you understood me), and the text that was added is just rubbish without the "registration" of these missiles and systems. I "registered" them, made some changes, for some reason it was necessary to replace the machine gun index of the co-pilot with 26, instead of -1, and other little things. I did all this and the rockets started working. But now a bug has arisen.

D
Dmitry Evgenievich 12.11.21

Strelec-zmeya
Here's an example, in my personal modifications added guided missiles for the T-90:
Find the paragraph beginning with ObjectTemplate.activeSafe RotationalBundle RUTNK_T90_Barrel_Base line
in this paragraph after ObjectTemplate.addTemplate S_RUTNK_T90_Barrel_Base_RotationRpm line adds ObjectTemplate.addTemplate RUTNK_T90_agm114Launcher line
this we past by the driver of the tank added a new weapon paired with a machine gun, in my case it will be ATGMs (RUTNK_T90_agm114Launcher - the name given by me to the new weapon)
Next, go to the end of the gun description, (find the paragraph starting with the line ObjectTemplate.activeSafe Sound S_T90GunProjectile_Looping, and go down to it) new weapons:
SpoylerObjectTemplate.create RUTNK_T90_agm114Launcher GenericFireArm
ObjectTemplate.modifiedByUser "Root"
ObjectTemplate.createdInEditor 1
rem --- BeginComp: WeaponHud ---
ObjectTemplate.createComponent WeaponHud
ObjectTemplate.weaponHud.hudName "KILLMESSAGE_VEHICLE_t90"
ObjectTemplate.weaponHud.guiIndex 17
ObjectTemplate.weaponHud.altGuiIndex 17
ObjectTemplate .weaponHud.hasFireRate 0
ObjectTemplate.weaponHud.enableMouse 0
ObjectTemplate.weaponHud. displaySelectOnActivation 0
Spoiler no space after Hud.
rem --- EndComp ---
rem --- BeginComp: SingleFireComp ---
ObjectTemplate.createComponent SingleFireComp
ObjectTemplate.fire.roundsPerMinute 8
ObjectTemplate.fire.addFireRate 0
ObjectTemplate.fire.projectileStartPosition 0.45 / 0.4 / -0.7
rem --- EndComp ---
rem --- BeginComp: DefaultAmmoComp ---
ObjectTemplate.createComponent DefaultAmmoComp
ObjectTemplate.ammo.nrOfMags 6
ObjectTemplate.amize 1
ObjectTemplate.ammo.reloadTime 1
ObjectTemplate.ammo.autoReload 1
ObjectTemplate.ammo.reloadWithoutPlayer 1
rem EndComp --- ---
rem --- BeginComp: WeaponBasedRecoilComp ---
ObjectTemplate.createComponent WeaponBasedRecoilComp
ObjectTemplate.recoil.cameraRecoilSpeed 13
ObjectTemplate.recoil .cameraRecoilSize 1.5
rem --- EndComp ---
rem --- BeginComp: SimpleDeviationComp ---
ObjectTemplate.createComponent SimpleDeviationComp
rem --- EndComp ---
rem --- BeginComp: DefaultSoundComp ---
ObjectTemplate.createComponent DefaultSoundComp
rem --- EndComp ---
rem --- BeginComp: DefaultAnimationComp ---
ObjectTemplate.createComponent DefaultAnimationComp
rem - --EndComp ---
rem --- BeginComp: DefaultZoomComp ---
ObjectTemplate.createComponent DefaultZoomComp
ObjectTemplate.zoom.addZoomFactor 0
rem --- EndComp ---
rem --- BeginComp: LPTargetComp ---
ObjectTemplate.createComponent LPTargetComp
ObjectTemplate. target.maxDistance 5000
ObjectTemplate.target.setTargetAtMaxDistance 1
ObjectTemplate.target.targetSystem TSWireGuided
UniqueTarget ObjectTemplate.target.targetObjectTemplate
ObjectTemplate.target.disableGuidanceOnReload 0
rem --- --- EndComp
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
ObjectTemplate.aiTemplate RocketGun3
rem --------- ----------------------------
ObjectTemplate.addTemplate S_RUTNK_T90_agm114Launcher_Fire1P
ObjectTemplate.addTemplate S_RUTNK_T90_agm114Launcher_Fire1P_Outdoor
ObjectTemplate.addTemplate S_RUTNK_T90_agm114Launcher_Fire3P
ObjectTemplate.addTemplate S_RUTNK_T90_agm114Launcher_BoltClick
ObjectTemplate.addTemplate S_RUTNK_T90_agm114Launcher_TriggerClick
S_RUTNK_T90_agm114Launcher_SwitchFireRate ObjectTemplate.addTemplate
ObjectTemplate.addTemplate S_RUTNK_T90_agm114Launcher_Reload1P
ObjectTemplate.addTemplate S_RUTNK_T90_agm114Launcher_Reload3P
ObjectTemplate.addTemplate S_RUTNK_T90_agm114Launcher_Deploy1P
ObjectTemplate.addTemplate S_RUTNK_T90_agm114Launcher_Deploy3P
ObjectTemplate.addTemplate S_RUTNK_T90_agm114Launcher_Zoom
ObjectTemplate.addTemplate S_RUTNK_T90_Barrel2_Fire1P
ObjectTemplate.setPosition 0 / -0.146312 / 5.00614
ObjectTemplate.addTemplate S_RUTNK_T90_Barrel2_Fire1P_Outdoor
ObjectTemplate.setPosition 0 / -0.146312 / 5.00614
ObjectTemplate.addTemplate S_RUTNK_T90_Barrel2_Fire3P
ObjectTemplate.setPosition 1.78814e-006 / -0.171334 / 4.91355
S_RUTNK_T90_Barrel_SwitchFireRate ObjectTemplate.addTemplate
ObjectTemplate.addTemplate S_RUTNK_T90_agm114Launcher_Barrel_Zoom
ObjectTemplate.addTemplate e_muzz_Tow
ObjectTemplate.setPosition 0 / -0.146312 / 5.00614
ObjectTemplate.addTemplate e_missile_ignition
rem ------------------------ -------------
ObjectTemplate.projectileTemplate agm65_maverick_tv
ObjectTemplate.keepProjectiles 5
ObjectTemplate.velocity 284
ObjectTemplate.itemIndex 2
ObjectTemplate.delayToUse 4

ObjectTemplate.activeSafe Sound S_RUTNK_T90_agm114Launcher_Fire1P
ObjectTemplate.modifiedByUser "Root"
ObjectTemplate.lowSamples 2147483647
ObjectTemplate. mediumSamples 2147483647
ObjectTemplate.soundFilename "objects / weapons / stationary / ats_tow / sounds / tow_fire_1p.wav"
Spoylerbez space after the stationary /
ObjectTemplate.loopCount 0
ObjectTemplate.is3dSound 0
ObjectTemplate.stopType 1
ObjectTemplate.volume 0.95
ObjectTemplate.pitch 1
ObjectTemplate.pan 0.5
ObjectTemplate.reverbLevel 1
ObjectTemplate.pitchEnvelope 0/1 / 0.9 / 1.1 /
1/1/0 / 0.97 / 1.03 / ObjectTemplate.volumeEnvelope 0/1/0/1/1/1/0 / 0.9 / 1 /

ObjectTemplate.activeSafe Sound S_RUTNK_T90_agm114Launcher_Fire1
ObjectTemOutdo. modifiedByUser "Root"

ObjectTemplate.activeSafe Sound S_RUTNK_T90_agm114Launcher_Fire3P
ObjectTemplate.modifiedByUser "Root"
ObjectTemplate.lowSamples 2147483647
ObjectTemplate.mediumSamples 2147483647
ObjectTemplate.soundFilename "objects / weapons / stationary / ats_tow / sounds / tow_fire_3p.wav"
Spoylerbez space after Stationary is /
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 1
ObjectTemplate.stopType 1
ObjectTemplate.volume 1
ObjectTemplate.pitch 1
ObjectTemplate.reverbLevel 1
ObjectTemplate.pitchEnvelope 0/1 / 0.9 / 1.1 /
1/1/0 / 0.97 / 1.03 / ObjectTemplate.volumeEnvelope 0/1/0/1/1/1/0 / 0.9 / 1 /
ObjectTemplate.position 1.78814e-006 / -0.171334 / 4.91355
ObjectTemplate.minDistance 10
ObjectTemplate.halfVolumeDistance 20
ObjectTemplate.soundRadius 1


The Sound S_RUTNK_T90_agm114Launcher_BoltClick ObjectTemplate.activeSafe
ObjectTemplate.modifiedByUser "Root"

ObjectTemplate.activeSafe the Sound S_RUTNK_T90_agm114Launcher_TriggerClick
ObjectTemplate.modifiedByUser "Root"

ObjectTemplate.activeSafe the Sound S_RUTNK_T90_agm114Launcher_SwitchFireRate
ObjectTemplate.modifiedByUser "Root"

ObjectTemplate.activeSafe the Sound S_RUTNK_T90_agm114Launcher_Reload1P
ObjectTemplate.modifiedByUser "Root"
ObjectTemplate.lowSamples 2147483647
ObjectTemplate. mediumSamples 2147483647
ObjectTemplate.soundFilename "objects / weapons / stationary / ats_tow / sounds / reload_missile.wav"
Spoiler no space after stationary /
ObjectTemplate.loopCount 1
ObjectTemplate.is3dSound 0
ObjectTemplate.stopType 1
ObjectTemplate.volume 0.91
ObjectTemplate.pitch 1
ObjectTemplate.pan 0.5
ObjectTemplate.reverbLevel 1

ObjectTemplate.activeSafe the Sound S_RUTNK_T90_agm114Launcher_Reload3P
ObjectTemplate.modifiedByUser "Root"

ObjectTemplate.activeSafe the Sound S_RUTNK_T90_agm114Launcher_Deploy1P
ObjectTemplate.modifiedByUser "Root"

ObjectTemplate.activeSafe the Sound S_RUTNK_T90_agm114Launcher_Deploy3P
ObjectTemplate.modifiedByUser "Root"

ObjectTemplate.activeSafe Sound S_RUTNK_T90_agm114Launcher_Zoom
ObjectTemplate.modifiedByUser "Root"
ObjectTemplate.fire.
ObjectTemplate.weaponHud.guiIndex - type of sight (I set it to be aviation, for guided missiles)
ObjectTemplate.weaponHud.enableMouse 0
ObjectTemplate.weaponHud. displaySelectOnActivation 0
Spoiler without a space after Hud. - I used these two lines to disable the selection of weapons with the mouse wheel (since there were no suitable weapon icons), I set similar lines for the standard weapon. Therefore, in order not to use F to switch (since I also added anti-tank missile jamming devices to the tank as an alternative to smoke grenades, and it was not convenient for me to always switch all types of weapons at once), we need to register
ObjectTemplate.itemIndex The number assigned to the weapon. It is necessary to register it both for the original weapon and for the new one, and they should not coincide! I want to note right away that some types of weapons are registered in separate files, and they are simply connected in the vehicle file (like, for example, the Coaxial_mg_mec machine gun paired with a gun) Their itemIndex is written in a separate description file (they can be here Objects_server.zip Weapons Armament ). Likewise with some types of ammunition. For example, missiles are usually described here Objects_server.zip Weapons Armament missiles, so in the ObjectTemplate.projectileTemplate line I just added the existing agm65_maverick_tv missile and I didn't need to create a new ammunition yet.
ObjectTemplate.aiTemplate - describes the conditions for using weapons by bots. I created new ones in the Weapons.ai file in the AI ​​folder in the tank files folder by simply adding these lines:
Spoiler
weaponTemplate.create RocketGun3
weaponTemplate.indirect 0
weaponTemplate.minRange 0.0
weaponTemplate.maxRange 5000.0
weaponTemplate.setStrength Infantry 0.0
weaponTemplate.setStrength LightArmour 0.0
weaponTemplate.setStrength LightArmour 0.0 weaponTemplate setStrength HeavyArmour 40.0
weaponTemplate.setStrength NavalArmour 0.0
weaponTemplate.setStrength Helicopter 0.0
weaponTemplate.setStrength AirPlane 0.0
weaponTemplate.allowedDeviation 3.0
weaponTemplate.setExplosionRadius 10.0
weaponTemplate.setFiresThroughTransparent 0
ObjectTemplate.delayToUse - the time to alert the weapon, took a few seconds, since both the new weapon and the old one use the same gun-launcher, and in theory it takes time to change the projectile.

In a number of lines I had to put extra spaces, otherwise I could not send the message - the limit is 48 characters in a row, I marked where they are with spoilers. If I can help with something, I will be glad.

PS I see that while typing the message, they have already answered.

S
Strelec-zmeya 12.11.21

_Zuko_42_
Regarding GenericFireArm - everything is OK. Here:
ObjectTemplate.create GenericFireArm AIX_Mi24_CoGunner_HellFireLauncherTV
Regarding GenericProjectile - this is not spelled out. This is not the case for homing missiles. For all other weapons, this case is present.
Regarding PlayerControlObject - it is present in Tweak only for two passengers, one machine gun and for a helicopter. Here:

ObjectTemplate.activeSafe PlayerControlObject AIX_Mi24
ObjectTemplate.activeSafe PlayerControlObject AIX_Mi24_CoGunner
ObjectTemplate.create PlayerControlObject AIX_Mi24_Passenger1
ObjectTemplate.create PlayerControlObject AIX_Mi24_Passenger

Regarding Bundle, I didn’t prescribe it. But for all weapons, this case is spelled out. And what name to give if you need to prescribe missiles for TV?

S
Strelec-zmeya 12.11.21

Dmitry Evgenievich
You spoiled it wrong))). But thanks for the answer. )) Not everything is done yet, so now I will read and delve into. ))

D
Dmitry Evgenievich 12.11.21

Strelec-zmeya
Regarding the bug, I advise you to check ObjectTemplate.fire.fireInput PIAltFire - right-click shooting. If this option is selected, then, in theory, a shot will occur when activated. You can also check ObjectTemplate.itemIndex if they are the same for different types of weapons. And there is also such a counter - one type of ammunition for several types of weapons ObjectTemplate.ammo.magLinkWeapon - indicates what other weapon ammunition is spent for when firing.

PS I have a problem with spoilers))) I rarely write on the forums, so I'm a little confused))

S
Strelec-zmeya 12.11.21

Dmitry Evgenievich
Now I'm checking out your advice. )) Thank you very much.

S
Strelec-zmeya 12.11.21

Dmitry Evgenievich
About PIAltFire. This line is only present on all rockets on this helicopter, except for machine guns and TV rockets. But I added it not far from the "registration" of guidance systems and TV missiles, as it was written in the example of this helicopter with TV missiles:
ObjectTemplate.specialToggleWeaponInput PIAltFire The
indices do not intersect anywhere.
And there are no ObjectTemplate.ammo.magLinkWeapon lines at all.

PS I decided to remove the ObjectTemplate.specialToggleWeaponInput PIAltFire line, and the co-pilot, when RMB was pressed, began to simply stupidly shoot these missiles, without switching to a TV camera and other things. I returned it back.

D
Dmitry Evgenievich 12.11.21

Strelec-zmeya
ObjectTemplate.specialToggleWeaponInput - didn't work with this. Now I'm looking at the US Supercobra, there this line is only in the description of the co-pilot, that is, the arrow. If I understood correctly, she should be responsible for which button activates a special weapon, that is, TV missiles.
SpoylerObjectTemplate.activeSafe AHE_AH1Z_COgunner PlayerControlObject
ObjectTemplate.modifiedByUser ljo
ObjectTemplate.setNetworkableInfo BasicInfo
rem --- BeginComp: VehicleHud ---
ObjectTemplate.createComponent VehicleHud
ObjectTemplate.vehicleHud.hudName "KILLMESSAGE_VEHICLE_cobra"
ObjectTemplate.vehicleHud.miniMapIconLeaderSize Medium
ObjectTemplate.vehicleHud.vehicleIconPos 64/14
ObjectTemplate.vehicleHud.useSelectionIcons 0
rem EndComp --- ---
rem --- BeginComp: WarningHud ---
ObjectTemplate.createComponent WarningHud
ObjectTemplate.WarningHud.warningType 2
ObjectTemplate.WarningHud.firstWarningSound HUD_Heatseeker_Track_Warning
ObjectTemplate.WarningHud.secondWarningSound HUD_Heatseeker_Lock_Warning
ObjectTemplate.WarningHud. warningIcon Ingame GeneralIcons Action_Icons large_laserLockIcon.tga
Spoiler no space after GeneralIcons
rem --- EndComp ---
rem --- BeginComp: HelpHud ---
ObjectTemplate.createComponent HelpHud
ObjectTemplate.HelpHud.helpStringKeyASS "HUD_HELPEL_HVEHided
Spoiler no space after PASSENGER_
ObjectTemplate.HelpHud.helpSoundKey "switchToGuidedMissiles"
rem --- EndComp ---
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.aiTemplate Ahe_Ah1z_Gunner
rem ---------------- --------------------
ObjectTemplate.addTemplate S_AHE_AH1Z_COgunner_Ambient
ObjectTemplate.addTemplate S_AHE_AH1Z_COgunner_AmbientDamaged
ObjectTemplate.addTemplate AHE_AH1Z_HellFireLauncherLaser_Camera
ObjectTemplate.setPosition 1.29 / 0.14278 / -1.25312
ObjectTemplate.setRotation 0 / -4 / 0
ObjectTemplate.addTemplate AHE_AH1Z_CoGunner_HellFireLauncherTV
ObjectTemplate.setPosition 1.29 / 0.14278 / -3.25312
ObjectTemplate.setRotation 0/5/0
ObjectTemplate.addTemplate ahe_ah1z_cameramount
ObjectTemplate.setPosition -0.0205 / 1.14775 / -0.4
ObjectTemplate.setRotation -1.6 / -7 / 0.3
rem ----------------- --------------------
ObjectTemplate.setSoldierExitLocation 2.5 / 0 / -1.5 0/0/0
ObjectTemplate.altSoldierExitPosition 0 / -0.5 / 1
ObjectTemplate.seatInformation AHE_AH1Z_COgunner 0 / 0.992083 /-0.308211 0/0/0
ObjectTemplate.seatAnimationSystem Objects / Vehicles / Common / Animations / 3p_aircraftCoPilot_A_animSys.inc
Spoiler without a space after Common /
ObjectTemplate.soundFilter heli
ObjectTemplate.specialToggleWeaponInput
PIAltFire ObjectCemategopter
VCLand ObjectTemplate.controlsCategory
ObjectTemplate.listenerObstruction 0.5
ObjectTemplate.damagedAmbientSoundLimit 0.15
ObjectTemplate.crewKitIndex 9
ObjectTemplate.autoUseAbility 1
ObjectTemplate.hasRestrictedExit 1
ObjectTemplate.altSoldierExitPosition 0 / -0.5 / 1
systems as missile guidance prescribed in the description of weapons, so unexpected, that this line was there ...
SpoilerObjectTemplate.create GenericFireArm AHE_AH1Z_CoGunner_HellFireLauncherTV
ObjectTemplate.modifiedByUser ljo
ObjectTemplate.createdInEditor 1
rem --- BeginComp: WeaponHud ---
ObjectTemplate.createComponent
WeaponHapon
ObjectTemplate.weaponHud.selectIcon Ingame Weapons Icons Hud Selection HellFire_missile.tga
Spoiler no space after Hud
ObjectTemplate.weaponHud.crosshairIcon Ingame / Vehicles / Icons / Hud /Air/Attack/Su34/
TVGuided_tvGuided
ObjectTemplate.weaponHud.crosshairIconSize 0
ObjectTemplate.weaponHud.altCrosshairIcon Ingame / Vehicles / Icons / Hud /Air/Attack/Su34/TVGuided/tvGuided_Crosshair.tga
Spoylerbez space after Hud
ObjectTemplate.weaponHud.hudName "KILLMESSAGE_VEHICLE_cobra"
ObjectTemplate.weaponHud.guiIndex 25
ObjectTemplate. weaponHud.showClips 1
ObjectTemplate.weaponHud.enableMouse 1
ObjectTemplate.weaponHud .displaySelectOnActivation 1
Spoylerbez space after Hud
ObjectTemplate.weaponHud .enablePostProcessingOnGuiIndex 25
Spoylerbez space after Hud
ObjectTemplate.weaponHud .secondLockSound HUD_LaserGuided_Lock
Spoylerbez space after Hud
rem --- EndComp ---
rem --- BeginComp: MultiFireComp ---
ObjectTemplate.createComponent MultiFireComp
ObjectTemplate.fire. addFireRate 0
ObjectTemplate.fire.addFireRate 2
ObjectTemplate.fire.roundsPerMinute 1800
ObjectTemplate.fire.useDummyProjectiles 1
ObjectTemplate.fire.addBarrelName agm114_hellfiredummy
rem --- EndComp ---
rem --- BeginComp:
DefaultmoAmponCompon
ObjectTemplate.ammo.ammoType 15
ObjectTemplate.ammo.nrOfMags 1
ObjectTemplate.ammo.magSize 8
ObjectTemplate.ammo.reloadTime 8
ObjectTemplate.ammo.autoReload 1
ObjectTemplate.ammo.reloadWithoutPlayer 1
rem --- EndComp ---
rem --- BeginComp --- WeaponBasedRecoilComp
ObjectTemplate.createComponent WeaponBasedRecoilComp
ObjectTemplate.recoil.recoilSize 1.01
ObjectTemplate.recoil.cameraRecoilSpeed 13
ObjectTemplate.recoil.cameraRecoilSize 1
rem --- EndComp ---
rem --- BeginComp: HelpHud ---
ObjectTemplate.createComponent HelpHud
ObjectTemplate. HelpHud.helpStringKey "HUD_HELP_VEHICLE_HELO_PASSENGER_ CONTROLS_TVGUIDED_clickToGuide"
Spoylerbez space after PASSENGER_
ObjectTemplate.HelpHud.helpSoundKey "HUD_HELP_VEHICLE_HELO_PASSENGER_ CONTROLS_TVGUIDED_clickToGuide"
Spoylerbez space after PASSENGER_
rem --- EndComp ---
rem --- BeginComp: SimpleDeviationComp ---
ObjectTemplate.createComponent SimpleDeviationComp
rem --- --- EndComp
rem - -BeginComp: DefaultSoundComp ---
ObjectTemplate.createComponent DefaultSoundComp
rem --- EndComp ---
rem --- BeginComp: PostProcess ---
ObjectTemplate.createComponent PostProcess
rem --- EndComp ---
rem --- BeginComp: DefaultAnimationComp - -
ObjectTemplate.createComponent DefaultAnimationComp
rem --- EndComp ---
--- BeginComp rem: ToggleCameraComp ---
ObjectTemplate.createComponent ToggleCameraComp
ObjectTemplate.zoom.startCameraId 11
ObjectTemplate.zoom.startCameraViewMode 1
ObjectTemplate.zoom.useProjectileCamera 1
ObjectTemplate.zoom.allowUntoggledFire 0
rem EndComp --- ---
rem --- BeginComp: MultiFireArmTargetComp ---
ObjectTemplate.createComponent MultiFireArmTargetComp
ObjectTemplate.target.maxDistance 5000
ObjectTemplate.target.targetSystem TSLaserGuided
ObjectTemplate.target.useCameraDirectionToTarget 1
ObjectTemplate.target.lockDelay 2.5
ObjectTemplate.target.lockAngle 10
rem --- --- EndComp
ObjectTemplate. floaterMod 0
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.material 56
ObjectTemplate.aiTemplate RocketGunHeli2
rem -------------------------------------
ObjectTemplate.addTemplate S_AHE_AH1Z_CoGunner_ HellFireLauncherTV_Fire1P
Spoylerbez space after CoGunner_
ObjectTemplate.addTemplate S_AHE_AH1Z_CoGunner_ HellFireLauncherTV_Fire1P_Outdoor
Spoylerbez space after CoGunner_
ObjectTemplate.addTemplate S_AHE_AH1Z_CoGunner_ HellFireLauncherTV_Fire3P
Spoylerbez space after CoGunner_
ObjectTemplate.addTemplate S_AHE_AH1Z_CoGunner_ HellFireLauncherTV_BoltClick
Spoylerbez space after CoGunner_
ObjectTemplate.addTemplate S_AHE_AH1Z_CoGunner_ HellFireLauncherTV_TriggerClick
Spoylerbez space after CoGunner_
ObjectTemplate.addTemplate S_AHE_AH1Z_CoGunner_ HellFireLauncherTV_SwitchFireRate
Spoylerbez space after CoGunner_
ObjectTemplate.addTemplate S_AHE_AH1Z_CoGunner_ HellFireLauncherTV_Reload1P
Spoylerbez space after CoGunner_
ObjectTemplate.addTemplate S_AHE_AH1Z_CoGunner_ HellFireLauncherTV_Reload3P
Spoylerbez space after CoGunner_
ObjectTemplate.addTemplate S_AHE_AH1Z_CoGunner_ HellFireLauncherTV_Deploy1P
Spoylerbez space after CoGunner_
ObjectTemplate.addTemplate S_AHE_AH1Z_CoGunner_ HellFireLauncherTV_Deploy3P
Spoylerbez space after CoGunner_
ObjectTemplate .addTemplate S_AHE_AH1Z_CoGunner_ HellFireLauncherTV_Zoom
Spoiler no space after CoGunner_
ObjectTemplate.addTemplate agm114_hellfiredummy
ObjectTemplate.setPosition -2.6 / -0.32 / 0.2
ObjectTemplate.setRotation 0 / -9 / 0
ObjectTemplate.addTemplate agm114_hellfiredummy
ObjectTemplate.setPosition / 0.29.6 /
-0.02
ObjectTemplate.addTemplate agm114_hellfiredummy
ObjectTemplate.setPosition -2.9 / -0.32 / 0.2
ObjectTemplate.setRotation 0 / -9 / 0
ObjectTemplate.addTemplate agm114_hellfiredummy
ObjectTemplate.setPosition -2.9 / -0.02 / 0.2
ObjectTemplate.setRotation 0 / -9 / 0
ObjectTemplate.addTemplate agm114_hellfiredummy
ObjectTemplate.setPosition 0.0 / -0.32 / 0.2
ObjectTemplate.setRotation 0 / -9 / 0
ObjectTemplate.addTemplate agm114_hellfiredummy
ObjectTemplate.setPosition 0.0 / -0.02 / 0.2
ObjectTemplate.setRotation 0 / -9 / 0
ObjectTemplate.addTemplate agm114_hellfiredummy
ObjectTemplate.setPosition 0.3 / -0.32 / 0.2
ObjectTemplate.setRotation 0 / - 9/0
ObjectTemplate.addTemplate agm114_hellfiredummy
ObjectTemplate.setPosition 0.3 / -0.02 / 0.2
ObjectTemplate.setRotation 0 / -9 / 0
rem ------------------------ -------------
ObjectTemplate.projectileTemplate agm114_hellfire
ObjectTemplate.velocity 370
ObjectTemplate.itemIndex 2
ObjectTemplate.isSelectable 0
ObjectTemplate.blockInputOnRotBundle AHE_AH1Z_gunturret1
PS I changed the type of rockets on this turntable for myself, but this should not have affected the issue under discussion. I will now put one experiment, and unsubscribe.

S
Strelec-zmeya 12.11.21

Damn, how can I send a file?
Dmitry Evgenievich
Write in a personal where you can drop the file (mail, etc.)

D
Dmitry Evgenievich 12.11.21

Strelec-zmeya
I tried to experiment with ObjectTemplate.specialToggleWeaponInput - the same trouble, it's better not to touch it. I'll write the email address now, it's easier to look at the file itself.

D
Dmitry Evgenievich 12.11.21

Strelec-zmeya
The idea of ​​an operative solution appeared. In the description of the co-pilot's missile armament (TV missiles), after the ObjectTemplate.fire.roundsPerMinute 300 line, add the ObjectTemplate.fire.fireInput line PIFlareFire - this is fire with the X button (like heat traps and a smoke screen). In any case, it's worth a try, because in the excerpt of the file sent in a personal message, I see no reason for the bug under discussion.

S
Strelec-zmeya 12.11.21

Dmitry Evgenievich
_Zuko_42_
I just noticed that the co-pilot, when switching to TV missiles, on the panel of the number of missiles shows the number of TV missiles and next to the number of homing missiles! And when switching, homing is consumed, and when firing TV missiles, TV is consumed. What kind of weave?
PS. A little later I tried to remove the ObjectTemplate.fire.fireInput PIAltFire line from the main pilot's homing (CH) missiles, and the co-pilot's switching and firing became as they should be. But because of this, the main pilot cannot switch and fire his homing (CH) missiles. Why is it impossible to use these missiles together? Do I need to create suspension points with their own coordinates for each new rocket? And I also noticed that the TV rocket and the CH rocket have a collision model and geometry from the same agm114_hellfire rocket. But that doesn't seem to matter. It's just that these fucking missiles have the same launch point (or almost), have the same suspension for the missiles, and the game intertwines them therefore. So what?

D
Dmitry Evgenievich 12.11.21

Strelec-zmeya
On the co-pilot's bombers, missiles are consumed in two ways, either by aiming with a laser beam, or by the shot-and-forget principle, two types of weapons are registered there, but the ammunition consumption of both at the same time when firing in any of the ways is provided by the ObjectTemplate line. ammo.magLinkWeapon rather than similar weapon models, but here I don't see any link between missiles.

S
Strelec-zmeya 12.11.21

Dmitry Evgenievich
In short, this is some kind of kapets ... I've already tried all the advice, my ideas too. Either the game crashes, or everything becomes inoperative, or nothing changes.

D
Dmitry Evgenievich 12.11.21

Strelec-zmeya
Can I try to move all the first pilot's weapons with the left mouse button?

S
Strelec-zmeya 12.11.21

Dmitry Evgenievich
Not. The machine gun is a very useful topic. You just need to somehow make the game distinguish between all these weapons. I'll think.