-
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?
-
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.
-
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
[/QUOTE]
Hope this helps you
-
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules