Jump to content
mr_centipede

How to access an action from backpack that I am wearing?

Recommended Posts

[
	unitBackpack pltCmdr,
	"Reset Teams",
	"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_requestleadership_ca.paa",
	"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_requestleadership_ca.paa",
	"true",
	"true",
	{},
	{},
	{ {_x assignTeam (_x getVariable "defaultTeam")} forEach units AsltGrp },
	{},
	[],
	1,
	10,
	false,
	false
] call BIS_fnc_holdActionAdd;

I have this code here using BIS_fnc_holdActionAdd. The action is on the backpack. But I cannot access it unless I put the backpack on the ground first. How can I access it when I'm wearing the backpack?

Share this post


Link to post
Share on other sites

You need to apply the hold action on player and add a condition for his backpack.
 

Share this post


Link to post
Share on other sites

Thank you @pierremgi got this working.

 

{
[
	_x,
	"Reset Teams",
	"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_requestleadership_ca.paa",
	"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_requestleadership_ca.paa",
	"((typeOf unitBackpack _target) == 'B_RadioBag_01_wdl_F') && (_this distance _target <= 2) && (leader _this == _this)",
	"true",
	{},
	{},
	{ {_x assignTeam (_x getVariable "defaultTeam")} forEach units AsltGrp },
	{},
	[],
	1,
	10,
	false,
	false
] call BIS_fnc_holdActionAdd;
} forEach units AsltGrp;

 

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

×