Home   Help Search Login Register  

Author Topic: Grid Reference  (Read 456 times)

0 Members and 1 Guest are viewing this topic.

StonedSoldier

  • Guest
Grid Reference
« on: 20 Jan 2004, 16:35:55 »
i have a question is there a way so that a unit can detect its loaction and gives its position (grid reference) over sidechat


Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:Grid Reference
« Reply #1 on: 20 Jan 2004, 17:29:55 »
In a script;

_posx = getpos unitname select 0
_posy = getpos unitname select 1

UnitName Sidechat format ["My position is %1, %2", _posx, _posy]

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Grid Reference
« Reply #2 on: 20 Jan 2004, 18:23:53 »
You can find a reference from the editors depot tutorials.

Quote
Map Grid to X/Y Coordinates Table Jerommeke 1.0

You can build a script based on what icarus told you and using the reference above to give the position in map grids.
Not all is lost.

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:Grid Reference
« Reply #3 on: 20 Jan 2004, 18:27:48 »
Yes of course, the way I said it will give distances from the origin.  You want to then convert those numbers into a grid referance, ie letters and numbers.  Doing that on the fly mid mission however, I think will be tricky.