ffredyk 49 Posted January 29, 2015 I don't really have time for depackanging whole BIS game just to find how all the road classes are named. Can someone point me or show me some easy way on how to get them? I am making little racing court, but without navigation it's lacking main aspect of entertainment. I would like to experiment with displaying 3D icon symbol of road in the 50m front cone of player so he can see what is gonna f* him up behind the horizont. All I need is some easy way or guidance on how to get the classes of roads. I will figure the rest. Thanks for any help. Share this post Link to post Share on other sites
jshock 513 Posted January 29, 2015 These may be of interest: https://community.bistudio.com/wiki/BIS_fnc_nearestRoad https://community.bistudio.com/wiki/nearRoads https://community.bistudio.com/wiki/roadsConnectedTo 1 Share this post Link to post Share on other sites
ffredyk 49 Posted January 29, 2015 Thank you my savior Share this post Link to post Share on other sites
commanderx 17 Posted January 30, 2015 One more question to that. If I would like to find a road(segment) that is minimum 200m away from my point and maximum 250m I have to make two full searches, one with 200m radius and one with 250m radius and then subtract the results from each other, so that just these between 200 and 250 are left? Or I search for a segment and make _x distance _road and search as long as I found a segment that is at least 200m away? Any better and probably faster idea ho to achieve that? Share this post Link to post Share on other sites
ffredyk 49 Posted January 30, 2015 (edited) I would say that substracting two arrays would be faster process than computing distance between two vectors multiple times. Try using https://community.bistudio.com/wiki/BIS_fnc_codePerformance Compare these two: [" _array250 = player nearRoads 250; _array200 = player nearRoads 200; _arrayFinal = _array250 - _array200; "] call BIS_fnc_codePerformance; [" _array250 = player nearRoads 250; _arrayFinal = []; { if(_x distance player > 200) then {_arrayFinal = _arrayFinal + [_x]} } forEach _array250; "] call BIS_fnc_codePerformance; EDIT: Surprise :confused: First code: Second code: Edited January 30, 2015 by ffredyk Share this post Link to post Share on other sites
jshock 513 Posted January 30, 2015 Could make the second a bit faster even with count and distanceSqr and using pushBack opposed to "arr = arr + x" (if it's all necessary). Share this post Link to post Share on other sites