Jump to content
Sign in to follow this  
666JaakkoCZ

creation of equipment

Recommended Posts

Hey buddies, I have a problem creating a script.I create my own equipment with an action menu, when I come to the crate, It shows the class I want (machine gun, rifleman, etc). The menu works...the problem is here ( _hasruck = _unit call ACE_Sys_Ruck_fnc_hasRuck) used undefined variable the same (_ruckMags). I have the script from Arma 2 and I need to do it in Arma 3.

thank for you advices

Share this post


Link to post
Share on other sites

_hasruck = false;

_ruckType = "";

_ruckMags = [];

_ruckWeps = [];

 

 

// Checks if the unit calling the script has a ruck sack.

_hasruck = _unit call ACE_Sys_Ruck_fnc_hasRuck;

 

// If the previous is true, then we want to set the variables to nil so that the ruck is empty before deletion.

if (_hasruck) then

{

      _unit setVariable ["ACE_RuckMagContents", nil];

      _unit setVariable ["ACE_RuckWepContents", nil];           

      _unit setVariable ["ACE_RuckMagContents", _ruckMags, true];

     _unit setVariable ["ACE_RuckWepContents", _ruckWeps, true];

 

};

 

//

Share this post


Link to post
Share on other sites

I don't know how the backpacks work with ACE3, but to delete the player's backpack in Vanilla take this:

if !(backpack player isEqualTo "") then {removeBackpack player};

ACE2 was at a time when there were not much backpacking commands.

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  

×