Ah. And then you put whatever value you want into a publicvariable and send it to the clients?
Excellent.
Thanks.
No. You don't have to mess with pV:s and whatnot. What you need to do is make sure that the setTerrainGrid and setViewDistance commands are run on all machines. How do you do that? Why, its quite easy and there are several ways to do it. The init.sqs file of a mission is a good place to put things since the init.sqs script is run on mission start on all machines, both clients and servers.
What is being run on all machines then?
- All init lines of editor-placed units, objects and game logics.
- The "On Activation" and "On Deactivation" parts of triggers and waypoints at some point or another.
- The init.sqs in the mission (placed "beside" the mission.sqm in the mission's root folder).
Huh? could someone help a newbie with this. Can I place a command in a trigger to do this with terrain? Also I need a command or script to help change the view distance in mp.
You can use the
setViewDistance xxxx and
setTerrainGrid nnn in a trigger, in a units init line, in a game logic's init line or in a init.sqs script where one usually place these things.
I suggest doing it in a/the init.sqs file. Easy to edit, easy to find.
;
; example init.sqs that sets terrain detail to "high" and the view distance to 1500 m.
;
setTerrainGrid 6.25
setViewDistance 1500
Tada. Easy.
PS. If you don't know what the mission init.sqs file is or where to find/put it, it's time to browse a few of the excellent tutorials on basic mission editing here on OFPEC.