Place a yourself and a car in the editor
preview
execute this code to spawn 50 snakes which would autoaim on you:
private ["_civ","_snakes"];
_civ = createGroup civilian;
_snakes = [];
for "_i" from 1 to 50 do {
_snakes set [count _snakes, _civ createUnit [
"Snake_random_F",
position player,
[],
20,
"NONE"
]];
};
_snakes spawn {
waitUntil {
{
_x setVectorUp surfaceNormal getPosASL _x;
_x doMove ASLtoATL getPosASL player;
hintSilent str round diag_fps;
alive _x
} count _this == 0
};
};
FPS is ok at this point. Get in the car and drive away. After maybe 500m you will notice horrible FPS drop. Now restart the preview and this time remove doMove command. Execute following piece of code:
private ["_civ","_snakes"];
_civ = createGroup civilian;
_snakes = [];
for "_i" from 1 to 50 do {
_snakes set [count _snakes, _civ createUnit [
"Snake_random_F",
position player,
[],
20,
"NONE"
]];
};
_snakes spawn {
waitUntil {
{
_x setVectorUp surfaceNormal getPosASL _x;
_p = ASLtoATL getPosASL player;
hintSilent str round diag_fps;
alive _x
} count _this == 0
};
};
Drive away and everything is fine.