Skip to content

Instantly share code, notes, and snippets.

@LouDnl
Created August 20, 2015 15:23
Show Gist options
  • Save LouDnl/160c20a4cff7a5615feb to your computer and use it in GitHub Desktop.
Save LouDnl/160c20a4cff7a5615feb to your computer and use it in GitHub Desktop.
//works
_name = "LouD";
{
if (isPlayer _x && (name _x == _name)) then {
_unstuck = [(getPosASL _x select 0), (getPosASL _x select 1), (getPosASL _x select 2) + 1000];
_x setposATL _unstuck
}
} forEach playableUnits;
//doesnt work (_name would be the variable supplied by the script)
_name = _this select 0;
{
if (isPlayer _x && (name _x == _name)) then {
_unstuck = [(getPosASL _x select 0), (getPosASL _x select 1), (getPosASL _x select 2) + 1000];
_x setposATL _unstuck
}
} forEach playableUnits;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment