Jump to content
Crierd

ACE 3 Self Interaction Addition

Recommended Posts

So, I'm trying to figure out how to add a self-interaction item on the ACE self interact menu. The interaction will make it so I increase my player rating, this way, if I shoot civilians or accidentally teamkill, my team members can get in the car with me. I figure there are better ways to accomplish this, but I also wanted to figure out how to add a self-interaction to the list in case I decide to use it again for other things.

 

I read the ACE 3 Wiki but seem to have no success.

http://ace3mod.com/wiki/framework/interactionMenu-framework.html#

 

This is what I have in a file called rehab.sqf;

_action = ["Rehabilitate","Rehab Yourself","",{player addRating 2000;},{true}] call ace_interact_menu_fnc_createAction;
[(player), 1, ["ACE_SelfActions"], _action] call ace_interact_menu_fnc_addActionToClass;

In my init.sqf I have;

execVM "rehab.sqf";

I'm very new to scripting and would appreciate any help. I initially forgot to add a ; at the end of the first line and saw in my RPT file that not having the ; was an error, so, I know that my init.sqf calling the script is working, and as far as I can tell I am using the ACE functions properly. I just can't seem to somehow link it to myself in game so it will appear in the self-interaction menu.

 

I'm very new to scripting and would appreciate any help. 

Share this post


Link to post
Share on other sites

Try :

_action = ["Rehabilitate","Rehab Yourself","",{execVM "rehab.sqf"},{true}] call ace_interact_menu_fnc_createAction;
[player, 1, ["ACE_SelfActions"], _action] call ace_interact_menu_fnc_addActionToObject;

in initPlayerLocal.sqf

  • Like 1

Share this post


Link to post
Share on other sites

That worked, thanks. I just modified my rehab.sqf to have just the player addRating so that it uses the ACE action to call the script. 

  • Like 1

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

×