2015-03-20 02:32:44 +00:00
|
|
|
/*
|
2015-03-24 04:18:00 +00:00
|
|
|
* Author: esteldunedain
|
2015-03-20 02:32:44 +00:00
|
|
|
* 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"
|
|
|
|
|
2015-04-29 06:26:13 +00:00
|
|
|
private ["_parentPath","_actionName", "_i"];
|
2015-03-20 02:32:44 +00:00
|
|
|
_parentPath = [];
|
2015-03-21 12:37:01 +00:00
|
|
|
for [{_i = 0},{_i < (count _this) - 1},{_i = _i + 1}] do {
|
2015-03-20 02:32:44 +00:00
|
|
|
_parentPath pushBack (_this select _i);
|
|
|
|
};
|
2015-03-21 12:37:01 +00:00
|
|
|
_actionName = if (count _this > 0) then {
|
2015-04-06 16:22:43 +00:00
|
|
|
_this select ((count _this) - 1);
|
2015-03-21 12:37:01 +00:00
|
|
|
} else {
|
2015-04-06 16:22:43 +00:00
|
|
|
""
|
2015-03-21 12:37:01 +00:00
|
|
|
};
|
2015-03-20 02:32:44 +00:00
|
|
|
|
|
|
|
[_parentPath, _actionName]
|