setViewDistance: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
(Fix description)
 
(54 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| ofp |= Game name
|game1= ofp
|version1= 1.00


|1.00|= Game version
|game2= ofpe
|version2= 1.00


|eff= local |= Effects in MP
|game3= arma1
____________________________________________________________________________________________
|version3= 1.00


| Set rendering distance, in metres. Default is 900m (in OFP) or 1,200m (in ArmA), accepted range is 500m to 5,000m (in OFP) or 10,000m (in ArmA). |= Description
|game4= arma2
____________________________________________________________________________________________
|version4= 1.00


| '''setViewDistance''' distance |= Syntax
|game5= arma2oa
|version5= 1.50


|p1= distance: [[Number]] |= Parameter 1
|game6= tkoh
|version6= 1.00


| [[Nothing]] |= Return value
|game7= arma3
____________________________________________________________________________________________
|version7= 0.50
 
|x1= <code>[[setViewDistance]] 2250;</code> |= Example 1


|x2= <code>//reset view distance in Arma 3
|eff= local
[[setViewDistance]] -1;</code> |= Example 2
____________________________________________________________________________________________


| [[viewDistance]], [[setTerrainGrid]], [[setObjectViewDistance]]  |= See also
|gr1= System


|gr2= Environment
|descr= Set rendering distance. Setting view distance to >= 0 resets the value to the client's options (set in {{hl|Options → Video → General → Visibility → Overall}}).
{{Feature|informative|In previous versions, client's max view distance was limited by the server's view distance.}}
{{Feature|important|
View distance also defines the maximum distance between a unit and any other unit they can [[knowsAbout|know about]].
Higher view distance will involve more AI simulation cycles for every unit, which causes low performance. See [[Arma 3: Performance Optimisation]].
}}
}}


<h3 style="display:none">Notes</h3>
{{{!}} class="wikitable"
<dl class="command_description">
! Game
<!-- Note Section BEGIN -->
! min. scripted
<dt class="note">'''[[User:Ceeeb|Ceeeb]]'''
! min. UI
<dd class="note">
! default
In '''OFP v1.96''', view distance also defines the maximum distance between a unit and any other unit they can [[knowsAbout|know about]]. Higher view distance will involve more AI simulation cycles for every unit, which causes low performance.
! max. UI
<!-- Note Section END -->
! max. scripted
</dl>
{{!}}-
<dl class="command_description">
{{!}} {{arma3}}
<!-- Note Section BEGIN -->
{{!}} 200
<dt class="note">'''[[User:galzohar|galzohar]]'''
{{!}} 500
<dd class="note">
{{!}} '''1600'''
I tested the above and it seems to apply in Arma 2 as well. AI at a bit above 500m would stop engaging when I lowered the view distance down to 500m and re-engaged when I increased it back.
{{!}} 12000
<!-- Note Section END -->
{{!}} 40000
</dl>
{{!}}-
<dl class="command_description">
{{!}} {{arma2oa}}
<!-- Note Section BEGIN -->
{{!}} 200
<dt class="note">'''[[User:DesertEagle|DesertEagle]]'''
{{!}} 500
<dd class="note">
{{!}} '''2500'''
In ArmA 2 viewDistance can be set up to 15 km with this command ( while from interface only 10 km )
{{!}} 10000
<!-- Note Section END -->
{{!}} 15000
</dl>
{{!}}-
{{!}} {{arma2}}
{{!}} 200
{{!}} 500
{{!}} '''3000'''
{{!}} 10000
{{!}} 15000
{{!}}-
{{!}} {{arma1}}
{{!}} 200
{{!}} 500
{{!}} '''1200'''
{{!}} 10000
{{!}} 15000
{{!}}-
{{!}} {{ofp}}
{{!}} 500
{{!}} 500
{{!}} '''900'''
{{!}} 5000
{{!}} 5000
{{!}}}
 
|s1= [[setViewDistance]] distance
 
|p1= distance: [[Number]] - distance in metres; {{GVI|arma3|1.00|size= 0.75}} a negative value resets the view distance to user video setting


<h3 style="display:none">Bottom Section</h3>
|r1= [[Nothing]]
[[Category:Scripting Commands|SETVIEWDISTANCE]]
 
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
|x1= <sqf>setViewDistance 2250;</sqf>
[[Category:Scripting Commands OFP 1.96|SETVIEWDISTANCE]]
 
[[Category:Scripting Commands OFP 1.46|SETVIEWDISTANCE]]
|x2= <sqf>setViewDistance -1; // reset view distance in Arma 3</sqf>
[[Category:Scripting Commands ArmA|SETVIEWDISTANCE]]
 
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
|seealso= [[viewDistance]] [[setDetailMapBlendPars]] [[setTerrainGrid]] [[getObjectViewDistance]] [[setObjectViewDistance]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 17:19, 5 June 2023

Hover & click on the images for description

Description

Description:
Set rendering distance. Setting view distance to >= 0 resets the value to the client's options (set in Options → Video → General → Visibility → Overall).
In previous versions, client's max view distance was limited by the server's view distance.
View distance also defines the maximum distance between a unit and any other unit they can know about. Higher view distance will involve more AI simulation cycles for every unit, which causes low performance. See Arma 3: Performance Optimisation.
Game min. scripted min. UI default max. UI max. scripted
Arma 3 200 500 1600 12000 40000
Arma 2: Operation Arrowhead 200 500 2500 10000 15000
Arma 2 200 500 3000 10000 15000
Armed Assault 200 500 1200 10000 15000
Operation Flashpoint 500 500 900 5000 5000
Groups:
SystemEnvironment

Syntax

Syntax:
setViewDistance distance
Parameters:
distance: Number - distance in metres; Arma 3 logo black.png1.00 a negative value resets the view distance to user video setting
Return Value:
Nothing

Examples

Example 1:
setViewDistance 2250;
Example 2:
setViewDistance -1; // reset view distance in Arma 3

Additional Information

See also:
viewDistance setDetailMapBlendPars setTerrainGrid getObjectViewDistance setObjectViewDistance

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note