Home   Help Search Login Register  

Author Topic: Use titleText to display a variable  (Read 1654 times)

0 Members and 1 Guest are viewing this topic.

Offline mcnorth

  • Members
  • *
Use titleText to display a variable
« on: 25 May 2007, 10:15:19 »
I'm struggling with a debugging issue and want to see what an enemy squad knows about my guys, so..

_value = enemy knowsAbout myguy

TitleText (help) [%1, _value (help) "Plain down"]

I did this awhile back with distances between units and now I'm brain farting.

Thank you.

Offline Cheetah

  • Former Staff
  • ****
Re: Use titleText to display a variable
« Reply #1 on: 25 May 2007, 10:21:56 »
First you might want to start with a working hint. Because I'm not sure if the _value gives valid output.
Code: [Select]
_value = enemy knowsAbout myguy
hint format ["Value: %1",_value];

If you get that working, you could try the following.

Code: [Select]
_value = enemy knowsAbout myguy
titleText [format ["Value: %1",_value],"PLAIN"];

As far as I know, this should work.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Use titleText to display a variable
« Reply #2 on: 25 May 2007, 10:23:57 »
do you mean format? as in

Code: [Select]
_value = enemy knowsAbout myguy
TitleText [format ["%1", _value], "Plain down"]

at least that's the way it would have gone in OFP - not so sure about ArmA...

edit - ;) beaten to it once again

Offline mcnorth

  • Members
  • *
Re: Use titleText to display a variable
« Reply #3 on: 25 May 2007, 18:06:36 »
Excellent. Thanks guys.