baddo 0 Posted January 25, 2007 Is getting current viewdistance setting possible via scripting in OFP:R version 1.96? A way around this is to use setViewDistance and then the value is known, at least as long as the player doesn't change it from options menu. Does anyone know any methods to find out current viewdistance setting? Share this post Link to post Share on other sites
{USI}_Zombie 0 Posted January 25, 2007 if I recall, MP maps defaulted to 750 unless something else was set with setviewdistance, for sp and campaign it is dependant on your personal settings. Share this post Link to post Share on other sites
SevenBEF 0 Posted January 25, 2007 In FDF you can set autoviewdistance; the viewdistance of the weakest machine will be taken. Here's what the script looks like; it uses "benchmark" finmod\dta\scripts.pbo\eastborder\autovd.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ; ; Automatic viewdistance script v1.0 by Kegetys ; ; for FDFmod ; ; ; Sets viewdistance according to benchmark value of weakest client, ; from 900m (benchmark 2000) to 2000m (benchmark 6500) ; ? format["%1", player] == "scalar bool array string 0xfcffffef" : exit _min = 410 _max = 2000 _maxb = 6500 _b = benchmark FDF_AutoViewDistance = _max _mydist = (_b/(_maxb/(_max-_min)))+_min ? _mydist < 900 : _mydist = 900 ? _mydist > 2000 : _mydist = 2000 #luup if (FDF_AutoViewDistance > _mydist) then {FDF_AutoViewDistance = _mydist;publicvariable "FDF_AutoViewDistance"} ~0.0001 ? time < 5 : goto "luup" setviewdistance FDF_AutoViewDistance Hope this helps you Share this post Link to post Share on other sites
baddo 0 Posted January 25, 2007 I was asking if anyone knows a method to get the viewdistance, not set. Thanks anyway At this time I wrote my script so that there is setViewDistance in the start so I get the value from there, but I'd like to know if it is possible to avoid doing that because I'd rather not touch the viewdistance setting, just ask what it happens to be. One more function for BIS to add into the scripting language. Share this post Link to post Share on other sites