Open Celludriel opened 7 years ago
would rather just change the fn_createSpawnPos.sqf accordingly than also adding a new function and replacing the old one.
And I played around with the following bit ( didnt know nearestTerrainObjects ... seems new):
// https://community.bistudio.com/wiki/nearestObject // https://community.bistudio.com/wiki/nearestTerrainObjects
[] spawn { while { true } do {
private _amo = allMissionObjects "";
private _omo = [];
private _ot = nearestTerrainObjects [player, [], 20];
private _om = nearestObjects [player, ["All"], 20];
_om = _om - [player];
{ if ( _x in _amo AND !( _x isEqualTo player )) then { _omo pushBack _x }; false } count _om;
hint parseText format [ "%1
%2", _omo, _ot ]; sleep 0.5; };};
maybe this should be used to check for "empty space" than the ... _relPos findEmptyPosition [ 5, 50, "Land_VR_Block_02_F" ]; ...
I better safe than fast =)
Ok I'll make some changes tomorrow it's to late now to code further, what we have now seems to work but it might have been luck as well. I only ran the test mission twice
Ok that commit was mine, I'm at work, forgot I'm commiting with my work credentials.
I'll update the test mission when I get home, can't do that from here.
no hurry ... prob. wont have time to startup arma today/tomorrow anyways
Without the BI function I still had AI spawning in the rocks I tried twice after using the function and I haven't had it happen yet. I'm wondering if we aren't doing overkill now and that the bi function itself is enough. It seems to work now though