Jump to content
Sign in to follow this  
GSTAVO

RHS Folding weapons system

Recommended Posts

Hi, anyone knows how to implement the RHS Folding weapons system? In their website this show as WIP, so anyone can help me? 

 

Thank you

 

Share this post


Link to post
Share on other sites

Implementation is similar to the Safe Mode and Grip system stuff detailed on the page you looked at, in that you need a custom weaponInfoType for the weapon to call the folding function when the keys are pressed. And then the rhs_fold parameter to tell it which class to swap to when the folding/unfolding the weapon

class cfgWeapons {
  class Rifle_Base_F;
  class YourWeapon: Rifle_Base_F {
    // load script once player hold this weapon
    weaponInfoType = "rhs_rscOptics_yourWeaponHandler";
    // link to folded version of the model
    rhs_fold="YourWeapon_folded";
    // baseWeapon class for Arsenal
    baseWeapon="YourWeapon";
  };
  class YourWeapon_folded: YourWeapon {
    // link to unfolded version of the model
    rhs_fold="YourWeapon_folded";
  };
};

Should point to a RscInGameUI class that has the RHS AK folding function added to the onLoad call and its handler in the controls[] group. These can be added in sequence after the SafeMode or Grip stuff if you're using that too.

class RscPicture;
class RscInGameUI {
  class RscWeaponZeroing;
  class rhs_rscOptics_yourWeaponHandler: RscWeaponZeroing {
    onLoad="['onLoad',_this,'RscUnitInfo','IGUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay');_this call RHS_fnc_fold_AK";
    controls[] = {"CA_Zeroing","RHS_ak_fold_handler"};
    class RHS_ak_fold_handler: RscPicture {idc=9899;}; // IDC is important here!
  };
};

This is how it is implemented on our weapons currently. However, it might be listed as WIP on our documentation page if reyhard intends to change the system in future, and implementation could change slightly.

  • Like 3

Share this post


Link to post
Share on other sites
On 2017-3-14 at 10:14 PM, da12thMonkey said:

Implementation is similar to the Safe Mode and Grip system stuff detailed on the page you looked at, in that you need a custom weaponInfoType for the weapon to call the folding function when the keys are pressed. And then the rhs_fold parameter to tell it which class to swap to when the folding/unfolding the weapon


class cfgWeapons {
  class Rifle_Base_F;
  class YourWeapon: Rifle_Base_F {
    // load script once player hold this weapon
    weaponInfoType = "rhs_rscOptics_yourWeaponHandler";
    // link to folded version of the model
    rhs_fold="YourWeapon_folded";
    // baseWeapon class for Arsenal
    baseWeapon="YourWeapon";
  };
  class YourWeapon_folded: YourWeapon {
    // link to unfolded version of the model
    rhs_fold="YourWeapon_folded";
  };
};

Should point to a RscInGameUI class that has the RHS AK folding function added to the onLoad call and its handler in the controls[] group. These can be added in sequence after the SafeMode or Grip stuff if you're using that too.


class RscPicture;
class RscInGameUI {
  class RscWeaponZeroing;
  class rhs_rscOptics_yourWeaponHandler: RscWeaponZeroing {
    onLoad="['onLoad',_this,'RscUnitInfo','IGUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay');_this call RHS_fnc_fold_AK";
    controls[] = {"CA_Zeroing","RHS_ak_fold_handler"};
    class RHS_ak_fold_handler: RscPicture {idc=9899;}; // IDC is important here!
  };
};

This is how it is implemented on our weapons currently. However, it might be listed as WIP on our documentation page if reyhard intends to change the system in future, and implementation could change slightly.

Thank you very much!

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  

×