Jump to content
Sign in to follow this  
Kneip2k

Multiplayer viewdistance...

Recommended Posts

Ye ye... Noobish 2k i know, but how do you change the viewdistance in multiplayer, is it set in stone? Running a LAN server but we only got like 1000 meters of view... Kill this topic if this have been up before. Did a search, but no result.

Happy new ARMA year! xmas_o.gif

Share this post


Link to post
Share on other sites

Guess you can set the server default (BIS default is 900) somewhere (refer to i.e. Avon Lady's FAQ here). but a simple, quick solution is just to put a trigger in the map that's activated somehow, and the to the "On activation" field, type <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">set viewdistance 1500, replacing the 1500 with the distance you want in meters.

Might be wrong, it might be "setviewdistance -number-", but I suggest that you try, search and... wait for answers.

Share this post


Link to post
Share on other sites

Oooh... Thanks! I will try that once we fire up the server again... Never seen that Avon Lady's FAQ, brilliant! Maybe there should be a sticky made for theese kinds of sites (Links sticky that is) Could be very helpfull instead of searching your a** of trying to find easy answers to simple questions... Or maybe there are some kind of links thread lying around here..?

But now its back to eating turkey, drinking beer and setting of some fireworks...  

And again... Thankz

yay.gif

Edit: Okay... I tried the "setviewdistance ****" but it did not work AFAIK...

Went over to the OFPEC.com and found aaaalot of stuff about MP viewdistance.

The only problem is that it was way to advanced for my brain...(LOL?)

Adaptive VD in MP

I think the "setviewdistance" thing is some local command

and not a server side thingy. Source for that wierd statement

Anyway I hope there is some easy ways to do this instead

of making advanced scripts (wich I have no clue how works

or where to put) all they say is "make a script ba ba ba

init.sqs ba ba ba ba) Sorry for almost whining, I think its the beer!

Share this post


Link to post
Share on other sites

You need to edit every mission where you want it to work. It's not a server command or a parameter for server config, it's a scripting command for missions. And yes, it's local, meaning that if only one client executes the command, only his VD will change. You can put it into init.sqs script in mission directory or the init line of some unit in the mission and it will be run on every client (depbo (=unpack) the mission file, edit and then pbo the dir again).

I think the easiest way (if you play a lot of different missions) in your case (playing on LAN) would be to use some addon or hack that gives you a console where you can enter scripting commands during game. That way you wouldn't have to edit any missions. You can run commands on all clients from a scripting console by putting them on the init line of an unit created with createUnit.

Share this post


Link to post
Share on other sites

Aha... So it is possible with different VD for different units...?

"setViewDistance" in the init line of unit ey? And not a trigger,

wich did not work.... I will test this... Have no idea what a script is really....

Im pretty green when it comes to OFP... But I am learning stuff each day now... I love it! tounge2.gif

Kneip

Share this post


Link to post
Share on other sites

The trigger works if it gets activated. Some "is present" type trigger (or, radio activation) with a tenth of a sec delay ought to do it, if the command is right.

Share this post


Link to post
Share on other sites

OK... And this trigger will work with every "human" player on

the server? I am all alone now and I do not know if just me

alone on the server would be a valid test...

My friends will gather tomorrow for some LAN action so it would be nice to

have this up and running by this night... I will do some further

testing tonight (my day/night rythm is totaly messed up).

I must say thanks for all the input... Very helpfull indeed..

                                      smile_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]Aha... So it is possible with different VD for different units...?

"setViewDistance" in the init line of unit ey? And not a trigger,

Yes. And the init line of any unit is executed by ALL clients and the server/host, not just the player controlling the unit. Trigger will work also if it is activated, it's just faster (but messier) to type stuff like this on some random init line. Functions player and local can be used to have triggers working differently on clients to have different view distances for example.

Player returns the local player's character and then you can compare it to whatever you want to.

Usually, triggers get executed on every client but there are some special occassions when you only want the trigger to activate on the server for example, which is traditionally done by checking if a game logic placed in the mission is local (they are only local to the server, or the host on a non-dedicated server).

Quote[/b] ]Have no idea what a script is really....

Script is simply a text file in the mission directory (before that directory is packed into a pbo). In it there's some line based scripting commands, example init.sqs:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">setViewDistance 1800;

setTerrainGrid 25;

?side player == west : player addWeapon "NVGoggles";

?local server_logic : isServer = true;

exit

Init.sqs has a special purpose, it is run automaticly when the mission opens in to the briefing. Normally scripts are run with the command exec.

Share this post


Link to post
Share on other sites

When I unPBO the mission I have to make a init.sqs and simply

put in setViewDistance XXXX and then pack it again

and it should work for all players...? Or is it some more

commands that should be put in there...?

Now I am exploring new OFP frontiers...  smile_o.gif

Edit: Looks like that did the trick biggrin_o.gif Tried it as server but I

       dont know about the clients...

Share this post


Link to post
Share on other sites

Yep, it will work for everyone. Some missions have their own view distance settings though so you might need to edit them or make sure the added command comes after them. A simple way in most cases would be to start another script from init.sqs like this:

0 exec "setVD.sqs"

(Why the 0 you might ask. It's because exec requires that you give it at least some parameter to be passed on to the script, it might as well be 9786246, [], "hello world" etc)

Then make the setVD.sqs which has a 10 second delay before the command:

~10

setviewdistance 1234

Share this post


Link to post
Share on other sites

LoL the init.sqs was advanced enough for me... I will try to

aquire some more knowledge later, just need to cool my head down

after the viewdistance "problem". I mostly make my own

missions for LAN play (we are all green when it comes to OFP).

LoL my missions has only units and waypoints in it, no triggers and

stuff. It gets to complicated when trowing triggers in the

mix. But I can see the benefit with triggers and such involved.

Hell yesterday I found out that you can make the circle in the

waypoints bigger hahahaha...

Anyway thank you all for the help.... Now I will go and bug some

other forums with my trigger and objective questions...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×