OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: jakenoble on 30 Jan 2004, 16:50:42
-
I once saw something about view distance, about setting it to 500m?
Does this mean the view distance is set to a certian value regardless of the fog, night and cloud effects the mission has in it.
example 1, if i were to create a mission with max fog, would the view distance for the AI be the same as if there were no fog?
example 2, Or does the view distance get changed as the fog, cloud and night settings get changed.
If example 1 were true then does that mean the AI can shoot me even when i can't see him!
Thanks in advance for any help.
Jake
-
setviewdistance 5000
thats the max and the min is 500
-
Ok, is that for tha AI to see though, not accounting for fog?
-
i dont thin k it affects the ai. only the players
-
for players, so it does change the fog settings, as the player is only restricted by the fog, because we have eyes.
Where as the AI could see the fog
-
My understanding of the situation is as follows.
Fog is a real effect in the game. It affects human and AI players more or less equally. It is set by the mission designer, who may of course introduce a random element to it, and the player has nothing to say on the matter.
Viewdistance is unrelated to fog. It is a graphics option which sets the distance you can see on your screen and thereby affects the performance of the game. The player can change it freely at any time. It does not affect AI behaviour or anything else in the mission. If you could set the viewdistance low enough it would be theoretically possible for an AI unit that you couldn't see to shoot you. However, if you were shot by an AI loon at 500m you could consider yourself extremely unlucky.
The distance that you, the player, can actually see is obviously set by whichever of these effects kicks in first.
Sometimes game designers use viewdistance commands to help the mission run more smoothely on lower performance computers. This is largely to save you from having to pause the mission and change it yourself.
More tricky is smoke, such as that produced by smoke grenades. Humans can't see through it. AI loons can, so don't bother with smoke grenades in SP.
-
Thats daft that AI can see through smoke!
I get it now, so if i had max fog on, e.g. 30m was the distance me an AI could actually see, i would want to set the viewdistance to 500m because there is no point having it any higher as you can't see that far.
Also if there is an action packed bit of the game can i "setviewdistance 500" then later on after the actions "setviewdistance 2000", is it possible to skip from one to another.
-
Why if AI are supposedly affected by fog, they see me through bushes and they shoot straight through bushes where I would have a leaf or two in my face.
As for smoke grenades, I don't think it works on AI also.
Though for some reason before when I played a mission, the smoke gives you the effect or feeling your hidden, of course if I can't see through smoke and I know someone's there..... well I just go a blazin my way through. :gunman:
Nothing like setting up behind a smoke screen to see a LAW rocket emerge cominmg straight for you.
-
smoke grenades don't work on AI normally unless you have one of the few mods out there that makes em functional against AI ;)
also about setviewdistance.... this command does have a dramatic effect on everyone on the map AI or not ...
I remember reading about it on the official forums like a really long time ago.. but one of the BIS guys like Suma or Maruk posted that Setviewdistance does work on all units
so if you're putting setviewdistance 5000 in a trigger that means that everyone on the map can see that far away
as for the fact of AI shooting through fog and such and bushes.. if you've ever played SP missions where you aren't in command and in cadet mode you'll notice that when you're told to target something by your CO then the little square deal comes up where the guy was when he got called out to you .. the box may move.. stay still ect... this has nothing to do with the guys real position just his anticipated path based on when he was spotted..
well the AI works in the same way they get one of those little squares around you and they're gonna let some rounds loose in that direction whether or not they have a visual on you or not..... hiding for a few seconds usually can get the target box off of you and you can gain an advantage from the fog/bush you're in once again ..
also a better way to reduce lag/make missions run smoother besides using setviewdistance is by using the benchmark command on objects/units ect... so if your PC isn't so great.. you can still play the mission but with slightly less objects/units etc..
:toocool:
Edit: I just read also that you can use: setviewdistance benchmark
to automatically set the viewdistance to the recommended distance for the players computer
-
Back through the fog of time, all the way to Oct 2002, check it out:
http://waterman.conforums.com/index.cgi?board=general&action=display&num=1034165093
;D
Asmo
-
damn have we had forums that long? lol :o ;D
-
Edit: I just read also that you can use:  setviewdistance benchmarkÂÂ
to automatically set the viewdistance to the recommended distance for the players computer
That would be insane. Don't try it.
-
Why would it be insane it seems the best thing to do.
Anyone knoe where i can get this MOD so that smoke actually works in SP!?!
-
Interesting, didn't know that about viewdistance.
There is a reason that smoke doesn't work for AI, I remember reading a post by Marek or somebody. They did start to do it, but it was proving to be really hard and in the end they decided it was one of these things that wasn't worth the hassle. Or the CPU time during a mission.
-
Yeah, the setviewdistance benchmark idea is cool, but on a mission I was using it for it became a problem because:
A. Some players with low benchmarks were complaining that they couldn't see 10 M in front of themselves because they had such a low benchmark, didn't matter if the mission would lag or not with a regular benchmark setting.
B. Some players with really high benchmarks didn't like it because the AI engaged them at huge distances and lag became an issue if there was a large battle, etc.
The solution I had at first was to allow the player to setviewdistance benchmark via the radio menu if they wanted. After setting this up, nobody really used it and it just clogged up the radio menu, so I just removed it completely. (this was in my mission Chemical Warfare)
About the smoke, I believe ECP makes the smoke work for AI, as well as FDF.
Asmo
-
It's JAM and FDF if I'm not mistaken :P ;D
:toocool: