Jump to content
Sign in to follow this  
Joe98

setViewDistance of individual soldiers?

Recommended Posts

AI soldiers have an uncanny ability to see through the crest of a hill and through trees to spot enemy 400 - 600 meters away.

 

I have learnt that I can set the view distance to say, 250 meters and the problem is solved!

 

However the command is global and so it sets the view distance of every unit on the map - including me.

 

Can I set the view distance of individual soldiers?

 

.

.

 

Share this post


Link to post
Share on other sites

Thank you.

 

I set the skill of each soldier to almost zero.  Then in the init I used;    this setskill ["spotDistance", .1];

 

Then I did a series of tests on a runway.   I placed enemy soldiers at specific distances starting at 500 meters.  I reduced the distance by  a bit at a time.

 

At 500 meters they did not spot the enemy.

At 365 meters they did not spot the enemy.

At 360 meters they did spot the enemy.

 

I am disappointed that I cannot get it below 365 meters.  I was trying to get it down to 200 meters.

 

On Tanoa, we will have to get it down to 50 meters.......

 

.

Share this post


Link to post
Share on other sites

Did you try extremely small values like 0.00001?

Using aimingAccuracy 0.001 on AI with AT is hilarious, as they will blow themselves up most of the time :D

Share this post


Link to post
Share on other sites

Not yet!  Good idea!

 

I will try that and report back.

 

.

Share this post


Link to post
Share on other sites

After trying lots of zeros as suggested I finished up using zero!

 

Yes I set it to zero.

 

With the spotting distance set to zero,  my AI soldiers can spot enemy soldiers at 360 meters or less!   The same result as in post 3 above!

 

It seems the command has no effect.

.

Share this post


Link to post
Share on other sites

You want to do this for a specific soldier in a mission you're making? (I wouldn't get why you want to do this otherwise).

 

Then you could try making a little script that sets his behaviour to "CARELESS", until you get close, and set it to "AWARE"

Share this post


Link to post
Share on other sites

What he said ^^ :lol:

 

Also try to tweak spotTime at the same time. And, last but not least, you can always make sure that individual soldiers are facing some certain direction, watching some boring object, s.t. you can then go on and easily stab em in the back (coward!). Then again, I'm not too sure about the side-effects (i.e. when/if they'd snap out of it, w/o some explicit stimuli :unsure: ).

 

N.B. I also find it rather odd that 0 does not represent zero skill. Taking the example of spotDistance, we can not model a blind guy (hey, maybe just temporary for some fancy boom in yer face after effects script, who knows?). And that's kind of sad. I don't get the argument that units shall remain "functional", no matter how low the skill. Mission designers surely know what they're doing (well, not really, bwaha), so that's a non-issue. What's important are reasonable *defaults*. That's it. And then, if you have a normalized 0-1 scale, make sure that 0 indeed means 0 skill - up to being brain-dead. So what? -- end of rant. B)

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  

×