OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: mcnorth on 25 May 2007, 10:15:19

Title: Use titleText to display a variable
Post by: mcnorth 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.
Title: Re: Use titleText to display a variable
Post by: Cheetah 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.
Title: Re: Use titleText to display a variable
Post by: bedges 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
Title: Re: Use titleText to display a variable
Post by: mcnorth on 25 May 2007, 18:06:36
Excellent. Thanks guys.