Home   Help Search Login Register  

Author Topic: A unit say his position?  (Read 536 times)

0 Members and 1 Guest are viewing this topic.

Aasi

  • Guest
A unit say his position?
« on: 02 Apr 2004, 07:01:39 »
Is it possible to make a unit to say where he is?

m21man

  • Guest
Re:A unit say his position?
« Reply #1 on: 02 Apr 2004, 19:32:25 »
In grid coordinates, or in the XYZ coordinates you get with getpos? Either way is possible :) .

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:A unit say his position?
« Reply #2 on: 02 Apr 2004, 23:53:10 »
Instead of answering with a question which the one asking will be looking at next time around, answer with both ways of doing it.

The best way is to use Softeggs script: here
If you use it as a separate script, you'll have to execute it as follows:
[getPos unitName select 0,getPos unitName select 1] exec "position_softegg.sqs"
and modify the line:
hint format ["%1%2", _xcoor, _ycoor]
to:
unitName sideChat format ["%1%2", _xcoor, _ycoor]
Optionally you can pass another element to the script so you can use that for multiple units. But I'll leave that up to you to ask  :)

And the 2nd way was already covered partially:
unitName sideChat format ["I'm at %1%2",getPos unitName select 0,getPos unitName select 1]
but I doubt that's of much use.

« Last Edit: 02 Apr 2004, 23:54:08 by MI_Fred »
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Aasi

  • Guest
Re:A unit say his position?
« Reply #3 on: 03 Apr 2004, 10:20:17 »
Thanks!