OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Insanoblan on 07 Mar 2007, 08:35:42

Title: Reloading GL - Specify Ammo
Post by: Insanoblan on 07 Mar 2007, 08:35:42
I am wondering what the code would be to make an OPFOR soldier load his AK74GL with the FlareWhite_GP25 from his inventory. I've been able to get him to fire the GL, but I don't know how to make him load the Flare, short of removing all of his grenades.
Title: Re: Reloading GL - Specify Ammo
Post by: Mr.Peanut on 13 Mar 2007, 18:59:02
I would write a script to unload all his nade ammo and replace it with flare ammo and vise versa. I doubt that there is any other way to force this behaviour.�  What happened when you order the unit to fire including the muzzle, mode and magazine type? i.e. unit fire [muzzle, mode, magazine] with the magazine as a flare?

If it was for a cutscene I would fake it.
Title: Re: Reloading GL - Specify Ammo
Post by: Mandoble on 13 Mar 2007, 19:46:12
To add a red flare to the unit (init field):
Code: [Select]
this removeMagazine "1Rnd_HE_GP25";this addMagazine "FlareRed_GP25"
To make it to fire it:
Code: [Select]
unitname fire ["GP25Muzzle", "GP25Muzzle", "FlareRed_GP25"]
Check this for Magazine Class Names (http://www.ofpec.com/COMREF/armaweapons.php)