Jump to content

Recommended Posts

Hi all, I have a quick question for all, using the BIS_fnc_arsenal how I can remove the magazine spawn on the weapon automatically loaded?

I know how to customise the arsenal for select which weapon/item will be loaded, but I haven't idea of how permit to take weapons from arsenal unloaded already.

Share this post


Link to post
Share on other sites

It is quite a hassle to change such a small thing. I've done it before.

The arsenal works with it's own function to handle all user input and loadout changes. To disable the loading of the extra magazines you'd have to replace the EH with setEventHandler and a modified version of the default EH everytime the arsenal is opened (There is a scripted EH to detect that). The default EH can be found in "\a3\functions_f_bootcamp\inventory\fn_arsenal.sqf" and is "SelectItem", line 1766 to 2176. The weapon and magazines are added with BIS_fnc_addweapon. Replace the third parameter with 0.

  • Like 3

Share this post


Link to post
Share on other sites
On 5/23/2019 at 8:48 PM, 7erra said:

The weapon and magazines are added with BIS_fnc_addweapon. Replace the third parameter with 0.

 

So if I rewrite the function and I create a custom function that's will work if I understood?

 

this is the original line

 

[_center,_item,4] call bis_fnc_addweapon;

 

Share this post


Link to post
Share on other sites

That and some smaller tricks. Here are the steps:

  1. Add an scripted EH to eh arsenalOpened event
  2. Inside of this EH find the arsenal display and the control which changes the weapon (primary, launcher, handgun)
  3. use ctrlSetEventhandler to remove default one and add your own
  4. Copy the code from the default EH into your own EH and modfiy the lines where BIS_fnc_addWeapon is called
  5. Watch out for all the defines and includes used in the default EH that you have them as well

As I said it is a small change but you have to create a new script with around 400 lines of code of which you change 3. But it is indeed possible!

  • Like 1

Share this post


Link to post
Share on other sites

Perhaps an odd question, but has there been found a solution for this? 

Whereas you can selec a weapon and -not- have your old magazines removed and new ones stuck in?

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

×