Author
Topic: distance (Read 617 times)

- I checked comref but can't see setDistance command:/ So how am I to place two units in exact distance from each other? Or make units follow e.g. tank in some specific range?

- While playing I noticed that AI units are very inexact in telling distance from enemy:/ For example - enemy tank spotted first time - AI unit says: "T80, 500m". And in just few moments the same units says: "Engage, T80, 200m". Why is that?

- I'm not sure but it seems to me that distance in OFP can be 50, 100, 200, 500, 1000 meters (and some more I assume but never experienced). Am I right? Btw, that would explain an issue mentioned above I guess?

?((_unit distance _spotter) < 500) and ((_unit distance _spotter) >= 200): _unit groupRadio _oggThat's my guess anyway. It would probably be more complex than that, but I imagine it's something along those lines. So basically if the spotter was less than 500m away but greater or equal to 200m away, then he would say that the _unit was 200m away.

Logged

Some of the most memorable missions made involve the player doing very little...

"But one thing I can tell you from not just OFP but life in general: criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

The game is not written in the scripting language This AI stuff is done within the game code (C++, or whatever), not with any scripts..

But it is pretty much like you put it, the AI spotted distance is rounded up/down with some criteria, it simulates the AI estimating the distance (for one, other reasons exist most likely).After all you can't tell exactly how far something is when you see it, can you?

But it is pretty much like you put it, the AI spotted distance is rounded up/down with some criteria, it simulates the AI estimating the distance (for one, other reasons exist most likely).After all you can't tell exactly how far something is when you see it, can you?

Yes, that is most likely the main reason for making it work that way. And another might have been that they would have had to record over 2000 different radio messages for every single distance;o

But at least command distance works correctly - and can read range between two objects accurately:)