OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: wi77ard on 28 Jan 2003, 05:18:28

Title: SetViewDistance for AI
Post by: wi77ard on 28 Jan 2003, 05:18:28
Is there anyway to set the distance that AI can see ?

If so plz plz let me know


Thanx
8)
Title: Re:SetViewDistance for AI
Post by: Pandoz on 28 Jan 2003, 17:05:11
do u want this so that they engage at a further distance? if so i think the only way to do this is to edit the lines of the config to make the aiviewdistance and shootingdistance/detection longer...but i could be wrong on what u want
Title: Re:SetViewDistance for AI
Post by: wi77ard on 28 Jan 2003, 19:08:27
I want to be able to restrict the distance that AI can see.

for example a soldier who was wounded that cant see as far as normal.

hope this makes more sense
Title: Re:SetViewDistance for AI
Post by: Pandoz on 29 Jan 2003, 03:12:05
hmm well u would definetly have to make a script...hmm well not definetly but im not a fan of triggers with complex stuff or long codes in them...something to the affect of ?(damage>.2):goto "loop1" and then in loop1 have like set whoevers view distance to ur number u want
Title: Re:SetViewDistance for AI
Post by: wi77ard on 29 Jan 2003, 23:53:05
Do you mean somethimg like this:


#loop
? (unitbob damage >.2):goto "damage"
? (unitbob damage <.2):goto "loop"
#damage
unitbob AIsetViewDsitance 1000
goto "loop"

with the AI unit being called unitbob
Title: Re:SetViewDistance for AI
Post by: _hammy_ on 30 Jan 2003, 00:58:39
its impossible, there is no command to change the distance the AI can see :)
Title: Re:SetViewDistance for AI
Post by: LCD on 30 Jan 2003, 01:01:54
da setviewdistance will reduce da cing distance of all da units in da game player units and AI ;D

LCD OUT
Title: Re:SetViewDistance for AI
Post by: asmodeus on 30 Jan 2003, 01:16:12
da setviewdistance will reduce da cing distance of all da units in da game player units and AI ;D
LCD OUT

Yep, this is a fact.  I saw this information on the official forums:

Quote
Yes, if you change viewdistance if affects AI (both friendly and enemy) as well, including tank IR scanner (and even including airplane/chopper radar).

--------------
Ondrej Spanel, BIS Lead Programmer

So... If you change the viewdistance, it will change it for everything in the game..  AI, player, vehicle, plane... You name it!  (it sucks)  

Asmo

P.S>   BTW, what does this have to do with advanced scripting?    ;)
Title: Re:SetViewDistance for AI
Post by: wi77ard on 30 Jan 2003, 01:36:32
thanx LCD