OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: JPSelter on 03 Sep 2005, 13:32:46
-
Is there a way to increase visibility range in multiplayer when IÂ'm the LAN-server? Normally I can see up to 4km but in mp I can see just 1km or less. Seems to be limited in mp sessions. IÂ'm sure there is a way to edit the mission to see farer.
-
Study the command setViewDistance.
The view distance needs to be set separately on each client - but every client needs to use the same value of course. Some people use the benchMark command to determine the weakest client computer and then sets the view distance to fit the weakest client's capabilities using the setViewDistance command.
-
Yes, but why does my global settings say 4km when I see in the singleplayer-mission-editor 4km and in the multiplayer-mission-editor only 1km. So I have to adjust the range somewhere in multiplayer. IÂ'm testing right now with no other client connected, just my own PC as the host. I only have 1km...
-
The Command Reference says that the default value of the setViewDistance is 900 meters.
It is very likely that you can't (you can, but it's not wise) set a very high view distance setting in a multiplayer mission, because some clients probably can't cope with it.
There is a script in the Editors Depot by joltan, which will help you to deal with this issue when editing multiplayer missions:
Viewdistance Negotiation for MP missions (http://www.ofpec.com/editors/resource_view.php?id=473)
Of course you can also make all clients to use a certain fixed value, like 4000 meters but then some client computers might have a lot of difficulties rendering the view.
I recommend to use joltan's script for the job.
-
I will look through this. Increasing the range is no problem here. I have only 3 clients connecting to my server, they are all here in my room and can handle the higher range. I wonÂ't try my mission on the internet ;)
-
as a sidenote to this
The players actual visible viewdistance is around 10% less than the (server ai) set by the command "setviewdistance"
So the following additional code placed in the Init.sqs may be of use for some mp sessions where you have enemy ai firing at you beyond your viewdistance
tx_vd = 1200
?!(local player): tx_vd = tx_vd * 0.9
setviewdistance tx_vd
The specifics for why this happens was explained to me, but i forgot the details.
It has something to do with a graphics card creating a "FOG" effect at vd limit
-
As a sidenote to this sidenote,
I think its even worser,the actual vieuwdistance is 33% less then setviewdistance xxx
Say U have Setviewdistance 1000,U can see objects max 666m far,but U can lock on (right click) till 1000m.
Setviewdistance 1333 will give U a visible area of 1 km