2015-01-19 04:08:34 +00:00
|
|
|
/*
|
2015-02-27 04:55:16 +00:00
|
|
|
* Author: commy2, NouberNou and CAA-Picard
|
2015-02-21 20:11:03 +00:00
|
|
|
* Remove an action from an object
|
2015-01-19 04:08:34 +00:00
|
|
|
*
|
|
|
|
* Argument:
|
2015-02-27 04:55:16 +00:00
|
|
|
* 0: Object the action is assigned to <OBJECT>
|
|
|
|
* 1: Type of action, 0 for actions, 1 for self-actions <NUMBER>
|
|
|
|
* 2: Full path of the action to remove <ARRAY>
|
2015-01-19 04:08:34 +00:00
|
|
|
*
|
|
|
|
* Return value:
|
2015-02-21 20:11:03 +00:00
|
|
|
* None
|
|
|
|
*
|
2015-02-27 05:20:28 +00:00
|
|
|
* Example:
|
|
|
|
* [cursorTarget,0,["ACE_TapShoulderRight","VulcanPinch"]] call ace_interact_menu_fnc_removeAction;
|
|
|
|
*
|
2015-02-21 20:11:03 +00:00
|
|
|
* Public: No
|
2015-01-19 04:08:34 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-02-27 05:20:28 +00:00
|
|
|
EXPLODE_3_PVT(_this,_object,_typeNum,_fullPath);
|
2015-01-19 04:08:34 +00:00
|
|
|
|
2015-02-27 04:55:16 +00:00
|
|
|
private ["_varName","_actions"];
|
|
|
|
_varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum;
|
|
|
|
_actions = _object getVariable [_varName, []];
|
2015-01-19 04:08:34 +00:00
|
|
|
|
2015-02-27 04:55:16 +00:00
|
|
|
{
|
2015-03-03 02:29:57 +00:00
|
|
|
if (((_x select 0) select 7) isEqualTo _fullPath) exitWith {
|
2015-02-27 04:55:16 +00:00
|
|
|
_actions deleteAt _forEachIndex;
|
|
|
|
};
|
|
|
|
} forEach _actions;
|