T-800a / T8_Units

http://forums.bistudio.com/showthread.php?182914-RELEASE-T8-Units-a-less-dynamic-AI-creator
8 stars 1 forks source link

Possible fix for units spawning in rocks #7

Open Celludriel opened 7 years ago

Celludriel commented 7 years ago
T-800a commented 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 =)

Celludriel commented 7 years ago

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

Celludriel commented 7 years ago

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.

T-800a commented 7 years ago

no hurry ... prob. wont have time to startup arma today/tomorrow anyways

Celludriel commented 7 years ago

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