fnc_addActionToObject Only Adds Root-level Actions
With no modules in an SP mission while pointed at a nearby man, this works:
_action = ['VulcanPinch','Vulcan Pinch','',{_target setDamage 1;},{true}] call ace_interact_menu_fnc_createAction;
[cursorTarget, 0, [], _action] call ace_interact_menu_fnc_addActionToObject;
Doesn't work:
_action = ['VulcanPinch','Vulcan Pinch','',{_target setDamage 1;},{true}] call ace_interact_menu_fnc_createAction;
[cursorTarget, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToObject;
Culprit:
fnc_addActionToObject modifies an object's GVAR(actions). The only function that uses this is fnc_renderActionPoints, and that's only if the action is at root level. So, any nested actions added to an object don't work.
Also: Self-actions added to player via fnc_addActionToObject don't work at any menu level, but that's debatably a problem; self interactions only respond to player, so using fnc_addActionToClass yields the same result without cross-object conflict. Still, documentation stating that it can't be used with player would be useful.
This is currently a stopper to make few things dynamic and object-specific, what happens is the interaction menu with all actions and sub-actions renders correctly but only for about 2-3 seconds, then it simply disappears.
@SilentSpike said he'll take a look when he is done with spectator stuff, but I noticed this issue and thought it would be a good idea to bump it.
I believe this has been fixed for a long time now, can anyone confirm?
Looking at my comment back from July 16th in #1862 it has been.
Let's close it.
Fairly sure I needed it to work for something I was working on at the time (probably slideshow module), pretty sure it works. :)