Skip to content

Instantly share code, notes, and snippets.

@dedmen
Created June 30, 2018 11:42
Show Gist options
  • Save dedmen/830b28054799dcdfa5548746b0da3b7a to your computer and use it in GitHub Desktop.
Save dedmen/830b28054799dcdfa5548746b0da3b7a to your computer and use it in GitHub Desktop.
private _fnc_scriptNameParent = if (isNil '_fnc_scriptName') then {'CBA_fnc_getPos'} else {_fnc_scriptName};
private _fnc_scriptName = 'CBA_fnc_getPos';
scriptName _fnc_scriptName;
#line 1 "\x\cba\addons\common\fnc_getPos.sqf [CBA_fnc_getPos]"
scriptName 'cba\common\getPos';
params [
["_entity", objNull, [objNull, grpNull, "", locationNull, taskNull, [], 0]]
];
getPos 15;
switch (typeName _entity) do {
case "OBJECT": {
getPos _entity
};
case "GROUP": {
getPos (leader _entity)
};
case "STRING": {
getMarkerPos _entity
};
case "LOCATION": {
position _entity
};
case "TASK": {
taskDestination _entity
};
case "ARRAY": {
+ _entity
};
case "SCALAR": {
+ _this
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment