Jump to content
Sign in to follow this  
iceman77

Ingame view distance script??

Recommended Posts

Is there a script where players can set their ViewDistance ingame on the fly?

Regards,

Iceman

Share this post


Link to post
Share on other sites

There is also a script in KilJoy's Evo called settings.sqf that can be executed via the action menu that you could use to get ideas of how to do it.

But it would be very easy to create your own that could be executed via radio trigger or addAction. The relevant command is setViewDistance

If you haven't used this command elsewhere in your missions the default view distance in ArmA is 1200m. So, just create a global variable in your mission with 1200 and use that as a jumping off point for the setViewDistance command.

Example:

init.sqf

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">viewDist = 1200;

viewdist.sqf (executed by an addAction that increases view distance by 100m)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

setViewDistance (viewDist + 100);

viewDist = viewDist + 100;

You can then create one to reduce view distance or if you don't want to go incremental forget about the global variable and just used fixed values (900, 1200, 1500, etc...).

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  

×