Jump to content
_SCAR

ACE additional action

Recommended Posts

I'm trying to add a custom action to a passenger in a truck:

 

KguR9q6msc.jpg

 

As you can see, only the default "Join group" action is available. I would like to add another action, for instance "get out of truck".

 

This is what I have, but it's not working:

 

_actionInfo = [
	"ScarPipelineWorkerGetOutOfVehicle",  // 0: Action name <STRING>
	"Get out of truck",                  // 1: Name of the action shown in the menu <STRING>
	"",                                 // 2: Icon <STRING>
	// Statement <CODE>
	{
		params ["_target", "_player", "_params"];
		[_target] orderGetIn false;	
		unassignVehicle _target;
	},
	// Condition <CODE>
	{ 
		params ["_target", "_player", "_params"];
		(vehicle _target == _target)
	}
];
 _action = _actionInfo call ace_interact_menu_fnc_createAction;
[_worker, 0, ["ACE_MainActions", "ACE_Passengers"], _action] call ace_interact_menu_fnc_addActionToObject;

 

....Any ideas?

 

Thank you,

_SCAR

 

  • Like 1

Share this post


Link to post
Share on other sites

I think you need to add it to self-action since you are inside the vehicle I believe you can't interact with it. If so, you might need to change the condition.

Nvm, I though you were inside also.

Share this post


Link to post
Share on other sites

For anyone wondering, a couple of things only needed to be changed:

  • this obviously needed to be attached to the vehicle
  • an additional item was needed: the name of the passenger
[_vehicle, 0, ["ACE_MainActions", "ACE_Passengers", str _worker], _action] call ace_interact_menu_fnc_addActionToObject;

 

  • Like 2

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

×