Jump to content
dwringer

Remove Weapon from Vehicle

Recommended Posts

PSEUDO-RETITLE OF POST:

"Remove Minigun from AH-9"

Hey all,

I created a script back when I was playing TKOH: Rearmed that would allow me to loadout the light attack helicopter with various different loadouts. I decided to see if it would work just as well in Arma 3 (with adjusted classnames), but have run into a snag.

I cannot figure out how to remove the "default" weapons from the Pawnee. I have not done experiments with other vehicles, but the "removeWeapon '...'" command does not seem to work as it did in TKOH. I have also tried removeAllWeapons to no avail - it does not work to remove weapons I have manually added, either. However, removeWeapon does seem to work on weapons that I have added with addWeapon.

Here is the code block I am focusing on:

		
_hel setVehicleAmmo 0;
_hel addMagazine "24Rnd_missiles";
_hel addMagazine "1000Rnd_65x39_Belt_Yellow";
_hel addMagazine "200Rnd_127x99_mag_Tracer_Red"; 
_hel addWeapon "LMG_coax";
_hel removeWeapon "M134_minigun";
_hel addWeapon "HMG_01"; 
_hel selectWeapon "LMG_coax";

It adds the weapons/ammo with no problem, and selects the LMG at mission start, but the minigun is still there (with no ammo) when I cycle through vehicle weapons.

Also, if I don't put the selectWeapon command as the very LAST command, it reselects the minigun by default. Even if i do selectWeapon lmg followed by addweapon HMG, the ammo-less minigun will still be selected on startup.

So, any clues as to why these features are changed in Arma 3, and any ideas for a workaround? Not game breaking but it is annoying to have an empty weapon there when it's not needed or wanted.

Thanks!

ADDED:

I have done more digging around on the BIS wiki, and apparently while the class info for the AH-9 indeed lists M134_minigun as one of the weapons on this vehicle, the CfgWeapons pages make absolutely no mention of the weapon. It would seem that the M134_minigun is almost "baked in" to the helicopter. Further testing has revealed that I am able to remove the rocket pods, just not the minigun. So, c'est la vie. Probably nothing we can do - but if anyone can show me to be incorrect, I would be very grateful :)

Edited by dwringer
Updated info

Share this post


Link to post
Share on other sites

Nothing easier than that:

_hel animate ["AddGunHolder",0];
_hel setvehicleammo 0;

http://i.imgur.com/ZNd1VUu.jpg (222 kB)

The first one will make the gun holders disappear, the second one will remove the rockets that are still hovering in the air.

Cheers

Share this post


Link to post
Share on other sites
Nothing easier than that:

_hel animate ["AddGunHolder",0];
_hel setvehicleammo 0;

http://i.imgur.com/ZNd1VUu.jpg (222 kB)

The first one will make the gun holders disappear, the second one will remove the rockets that are still hovering in the air.

Cheers

Hmm, very cool; I had a suspicion there was something like that. However I'm afraid it isn't quite the solution I was looking for. I actually want the rockets still there, and I want the hardpoints visible. Because I am still adding weapons to the helicopter, and when I fire they animate coming from those positions. I just don't want the minigun showing up in the list of weapons when i cycle through them, and afaik that still is not possible without removing the gun holders, as you said. But I appreciate the info; A3 has been out for months and I still keep finding commands from A2 I never really knew about, I am screwed when it comes to keeping up with this series :)

Share this post


Link to post
Share on other sites
On 3/12/2014 at 4:00 AM, Grumpy Old Man said:

Nothing easier than that:

 


_hel animate ["AddGunHolder",0];
_hel setvehicleammo 0;
 

 

http://i.imgur.com/ZNd1VUu.jpg (222 kB)

The first one will make the gun holders disappear, the second one will remove the rockets that are still hovering in the air.

Cheers

This does not work for the miniguns on the ghosthawk. It removes the ammo but not the actual interior miniguns, I'm assuming you can not remove the model, Anyone know a work around ?

Share this post


Link to post
Share on other sites

@WarhammerActual

I worked some hours to get this solved but sadly after all it seems to not be possible.

There is no AnimationSources entry for hiding the turrets using animateSource. Other vehicles like the UGV have such an entry.

Therefore it will not work with animations.

 

I also tried the way with setObjectTexture but there are only 2 hiddenSelectionsTextures wich can be reset and they are not covering the miniguns.

 

Also tried to remove magazines (removeMagazinesTurret) and weapons (removeWeaponTurret) but it removes the ability to shoot only and not the model of the miniguns.

 

I crawled the config viewer for the most of the time but there seems to be nothing helpful in there for the ghost hawk...

 

I would say it is impossible but Im not knowing all bout scripting.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×