Skip to content

Instantly share code, notes, and snippets.

@BaerMitUmlaut
Created May 1, 2019 19:07
Show Gist options
  • Save BaerMitUmlaut/9e52bc41b44d531fb0ae95fd5e49fe33 to your computer and use it in GitHub Desktop.
Save BaerMitUmlaut/9e52bc41b44d531fb0ae95fd5e49fe33 to your computer and use it in GitHub Desktop.
Permanent footprints
blue_footprints = [];
[{
private _footprints = player nearObjects ["#mark", 2];
{
private _p3d = (getModelInfo _x) select 1;
private _dir = direction _x;
private _pos = getPosASL _x;
_pos set [2, 0];
private _clone = createSimpleObject [_p3d, [0, 0, 0]];
_clone setPosATL _pos;
_clone setDir _dir;
blue_footprints pushBack _clone;
if (count blue_footprints > 1000) then {
private _first = blue_footprints deleteAt 0;
deleteVehicle _first;
};
// can't delete them for some reason ¯\_(ツ)_/¯
_x setPosASL [0, 0, 0];
} forEach _footprints;
}, 0, []] call CBA_fnc_addPerFrameHandler;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment