ACE3/addons/interact_menu/functions/fnc_splitPath.sqf
Nicolás Badano 84bf44e026 Refactoring of interact_menu:
- Reordering of action members
- Removed full path from actions, so they can be mounted under different paths if needed
- Added api for creating actions
- Api for adding actions for objects or classes
2015-03-19 23:32:44 -03:00

24 lines
502 B
Plaintext

/*
* Author: CAA-Picard
* Take full path and split it between parent path and action name
*
* Argument:
* Full path of the action to remove <ARRAY>
*
* Return value:
* 0: Parent path <ARRAY>
* 1: Action name <STRING>
*
* Public: No
*/
#include "script_component.hpp"
private ["_parentPath","_actionName"];
_parentPath = [];
for "_i" from 0 to (count _this) - 1 do {
_parentPath pushBack (_this select _i);
};
_actionName = _this select ((count _this) - 1);
[_parentPath, _actionName]