Kneip2k 0 Posted December 31, 2006 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! Share this post Link to post Share on other sites
BlackScorpion 0 Posted December 31, 2006 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
Kneip2k 0 Posted December 31, 2006 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 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
Metal Heart 0 Posted January 1, 2007 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
Kneip2k 0 Posted January 1, 2007 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! Kneip Share this post Link to post Share on other sites
BlackScorpion 0 Posted January 1, 2007 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
Kneip2k 0 Posted January 2, 2007 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.. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Share this post Link to post Share on other sites
Metal Heart 0 Posted January 2, 2007 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
Kneip2k 0 Posted January 2, 2007 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... Â Edit: Looks like that did the trick Tried it as server but I Â Â Â Â dont know about the clients... Share this post Link to post Share on other sites
Metal Heart 0 Posted January 2, 2007 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
Kneip2k 0 Posted January 2, 2007 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
Metal Heart 0 Posted January 2, 2007 Before you do that you should take a look at the tutorials at ofpec.com, there's some for briefing, waypoints and triggers: http://www.ofpec.com/ed_depot/tutes.php Good luck Share this post Link to post Share on other sites