Grumpy Old Man 3546 Posted April 22, 2017 Hey folks, with the rather new setFeatureType command it is now possible to render vehicles all the time up to terrain view distances (12km+). This little snippet helps doing that, just put it into init.sqf: _vehicles = ["B_MBT_01_arty_F","B_soldier_M_F"];//vehicle classes that should be visible _loop = _vehicles spawn { params ["_vehicles"]; while {true} do { { if (typeOf _x isKindof "Air" OR typeof _x in _vehicles) then {_x setFeatureType 2}; } forEach (vehicles + allunits); sleep 10; }; }; Just wanted to share it. Cheers 2 Share this post Link to post Share on other sites
M1ke_SK 230 Posted April 22, 2017 Thank you for sharing. Litte change where you _vehicles spawn { and then params ["_vehicles"]; you can use _this instead. Pointless to generate private _vehicles when you got it already in _this https://community.bistudio.com/wiki/Code_Optimisation#Fewer_statements_.3D.3E_faster_code Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted April 22, 2017 Doesn't really matter from a performance point of view, since the params command happens only once in the init.sqf. Cheers Share this post Link to post Share on other sites
Jnr4817 215 Posted April 22, 2017 How would I make this a mission parameter? Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted April 22, 2017 4 minutes ago, Jnr4817 said: How would I make this a mission parameter? I don't get the question. You either run it or don't. Cheers Share this post Link to post Share on other sites
Jnr4817 215 Posted April 22, 2017 Never mind. I was confused as to what the function was doing. I thought it was setting the distance separately. I see now it is allowing the view of objects you set to match your view distance. I figured it out. Thanks for the code snippet. How to make dedicated or multiplayer compatible? Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted April 22, 2017 Easiest would be to put this into initplayerlocal.sqf. Cheers Share this post Link to post Share on other sites