Jump to content
Sign in to follow this  
tromac

Set View Distance script

Recommended Posts

Hi all,

I've searched the forum for a script that allows players to change the view distance in a mission with no luck. I found one on Armaholic but get errors trying to use it. Does anyone know of a good script to do this?

Thanks in advance.

Share this post


Link to post
Share on other sites

Disregard the script works all of a sudden. It is at http://www.armaholic.com/page.php?id=12131 for reference on anyone else looking for it.

---------- Post added at 12:42 AM ---------- Previous post was at 12:41 AM ----------

Thanks Custom, though you missed the part where I said script :p

Share this post


Link to post
Share on other sites

init.sqf

[] spawn {
 setviewdistance 3000;
 private ["_id1","_id2","_veh"];
 while {true} do {
   waituntil {vehicle player == player};
   if (!isnil "_veh") then {
     _veh removeaction _id1;
     _veh removeaction _id2;
   };
   _id1 = player addAction ["Increase Viewdistance","vd.sqf",0,1,false,false];
   _id2 = player addAction ["Decrease Viewdistance","vd.sqf",1,1,false,false];
   waituntil {vehicle player != player};
   _veh = vehicle player;
   player removeaction _id1;
   player removeaction _id2;
   _id1 = (vehicle player) addAction ["Increase Viewdistance","vd.sqf",0,1,false,false];
   _id2 = (vehicle player) addAction ["Decrease Viewdistance","vd.sqf",1,1,false,false];
 };
};

vd.sqf, separate file

private "_vd";
_vd = switch (_this select 3) do {
 case 0: { viewdistance + 1000; };
 case 1: { viewdistance - 1000; };
};
setviewdistance _vd;
hintsilent format ["Viewdistance: %1",_vd];

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×