Jump to content
Sign in to follow this  
Kain181

Weapon Upgrade Project

Recommended Posts

Hi everybody.

I'm trying to create a weapon Upgrade/modify module using the RHS: AFRFand USAF infantry arsenal.
So the objective is to take some weapons with different skins or versions and let the player to modify then in a workbench like the "Metro Exodus" guns Wokbench.

For example:


We have the MK18 ("rhs_weap_mk18") and you want to upgrade with a SOPMOD stock ("rhs_weap_mk18_KAC") or the painted version of the same (Desert: "rhs_weap_mk18_d" / Woodland: "rhs_weap_mk18_wd"), so if you use the workbench as an "addaction" it lets you to updgrade or modify the weapon.

Or, you have the AK-103 ("rhs_weap_ak103") and the workbench lets you to install the B-13 rails system ("rhs_weap_ak103_npz") or install the grenade launcher ("rhs_weap_ak103_gp25"), or both ("rhs_weap_ak103_gp25_npz").

In my mind, I thought that using "IF" clausures as: 

 if (player hasWeapon "rhs_weap_ak103") then { 
workbench_modify addAction ["<t align='center'  size='1.2' color='#FFD733'>MODIFY WEAPON</t>", "weapon_modding.sqf", [], 1, true, true, "", "", 2, false];
...
...
...
};


But i'm not sure how  to do it.

If you let me some ideas it'll me so helpfull.

Thanks.

Share this post


Link to post
Share on other sites

sounds like a cool concept, best of luck!
 

dont add the menu to the scroll wheel if you dont have to. this seems something much more suited to using the inventory screen.
 

this is all extremely untested, just spitballing.. but in theory

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#InventoryOpened

use inventory Opened EH.

player opens vanilla inventory
when inventory is open find the inventory display and controls
get mouse right click
if mouse right clicks on an applicable weapon, create a small drop down menu over the mouse click position
player then selects "Modify Weapon" from the drop down tab
your custom modification UI is overlayed over the vanilla inventory screen
options for the selected weapon pop up

player modifies weapon

player closes your custom modification UI and the vanilla inventory screen is revealed underneath

player closes vanilla inventory

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
Sign in to follow this  

×