Home   Help Search Login Register  

Author Topic: Info Displayed in Hint Box  (Read 687 times)

0 Members and 1 Guest are viewing this topic.

Offline Arctic

  • Members
  • *
  • In Utero
Info Displayed in Hint Box
« on: 18 Nov 2002, 04:38:37 »
I am interested in working out a sniper spotter script for a mission but I can't figure out how to get like the distance of a chosen object as well as the type to be displayed in the hint box. I know its something like %d and %n but I dont understand this.


Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:Info Displayed in Hint Box
« Reply #1 on: 18 Nov 2002, 07:19:31 »
Your looking for the 'format' command, or tool, whatever. So it's the magic word you put in after Hint for example like this in your case:
_targetdist = player distance Guba

Hint format ["Guba is %1 meters away",_targetdist]

and now a hintbox with the line:
Guba is 800 meters away
is displayed if that's the distance.

Format can be used in lots of other places, the usage just varies so much that it's a tuff one. But that works for sure.  ;)
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.