/* * Author: esteldunedain * Creates an isolated ACE action * Note: This function is NOT global. * * Argument: * 0: Action name * 1: Name of the action shown in the menu * 2: Icon * 3: Statement * 4: Condition * 5: Insert children code (Optional) * 6: Action parameters (Optional) * 7: Position (Position array, Position code or Selection Name) , or (Optional) * 8: Distance (Optional) * 9: Other parameters (Optional) * 10: Modifier function (Optional) * * Return value: * Action * * Example: * ["VulcanPinch","Vulcan Pinch","",{_target setDamage 1;},{true},{},[parameters], [0,0,0], 100] call ace_interact_menu_fnc_createAction; * * Public: No */ #include "script_component.hpp" params [ "_actionName", "_displayName", "_icon", "_statement", "_condition", ["_insertChildren", {}], ["_customParams", []], ["_position", {[0, 0, 0]}], ["_distance", 2], ["_params", [false, false, false, false, false]], ["_modifierFunction", {}] ]; _position = if (_position isEqualType "") then { // If the action is set to a selection, create the suitable code compile format ["_target selectionPosition '%1'", _position]; } else { if (_position isEqualType []) then { // If the action is set to a array position, create the suitable code compile format ["%1", _position]; } else { _position; }; }; [ _actionName, _displayName, _icon, _statement, _condition, _insertChildren, _customParams, _position, _distance, _params, _modifierFunction ]