Jump to content

Recommended Posts

Hello,
Guys, please help me, i need remove my hold action but i dont know how to use BIS_fnc_holdActionRemove, could you give an example?

How to remove it with using BIS_fnc_holdActionRemove?

[
	_myLaptop,											// Object the action is attached to
	"Hack Laptop",										// Title of the action
	"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",	// Idle icon shown on screen
	"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",	// Progress icon shown on screen
	"_this distance _target < 3",						// Condition for the action to be shown
	"_caller distance _target < 3",						// Condition for the action to progress
	{},													// Code executed when action starts
	{},													// Code executed on every progress tick
	{ _this call MY_fnc_hackingCompleted },				// Code executed on completion
	{},													// Code executed on interrupted
	[],													// Arguments passed to the scripts as _this select 3
	12,													// Action duration [s]
	0,													// Priority
	true,												// Remove on completion
	false												// Show in unconscious state 
] remoteExec ["BIS_fnc_holdActionAdd", 0, _myLaptop];	// MP compatible implementation
[ player,10 ] call BIS_fnc_holdActionRemove;

 

Share this post


Link to post
Share on other sites
private _toRemoteExec = {
    laptopHackHoldActionId = [
      _myLaptop,											// Object the action is attached to
      "Hack Laptop",										// Title of the action
      "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",	// Idle icon shown on screen
      "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",	// Progress icon shown on screen
      "_this distance _target < 3",						// Condition for the action to be shown
      "_caller distance _target < 3",						// Condition for the action to progress
      {},													// Code executed when action starts
      {},													// Code executed on every progress tick
      { _this call MY_fnc_hackingCompleted },				// Code executed on completion
      {},													// Code executed on interrupted
      [],													// Arguments passed to the scripts as _this select 3
      12,													// Action duration [s]
      0,													// Priority
      true,												// Remove on completion
      false												// Show in unconscious state 
  ] call BIS_fnc_holdActionAdd;
};

[[], _toRemoteExec] remoteExec ["spawn", 0, _myLaptop];	

[_myLaptop, laptopHackHoldActionId] remoteExec ["BIS_fnc_holdActionRemove", 0];

 

Untested and there are undoubtedly better ways of doing this. 

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, stanhope said:

private _toRemoteExec = {
    laptopHackHoldActionId = [
      _myLaptop,											// Object the action is attached to
      "Hack Laptop",										// Title of the action
      "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",	// Idle icon shown on screen
      "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",	// Progress icon shown on screen
      "_this distance _target < 3",						// Condition for the action to be shown
      "_caller distance _target < 3",						// Condition for the action to progress
      {},													// Code executed when action starts
      {},													// Code executed on every progress tick
      { _this call MY_fnc_hackingCompleted },				// Code executed on completion
      {},													// Code executed on interrupted
      [],													// Arguments passed to the scripts as _this select 3
      12,													// Action duration [s]
      0,													// Priority
      true,												// Remove on completion
      false												// Show in unconscious state 
  ] call BIS_fnc_holdActionAdd;
};

[[], _toRemoteExec] remoteExec ["spawn", 0, _myLaptop];	

[_myLaptop, laptopHackHoldActionId] remoteExec ["BIS_fnc_holdActionRemove", 0];

 

Untested and there are undoubtedly better ways of doing this. 

Thanks, now I understand this syntax

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

×