PDA

View Full Version : List things in Hud display rather than all on 1 line.


hc_wolf
04-16-2012, 03:46 AM
I can not test as I am at work. But I did have "\n" in my code and it did nothing.

I have for example below a score ouput. Rather than have them both on the same line I want them to appear on separate lines.
Or if I had for example 3 completed objectives in a const String. I would want the 3 to list under each other not across the screen.

Any ideas? Anyone can test output to get a list?

Output of this puts the two scores side by side on the same line.
I would like to list them on two or more lines below each other

GamePlay.gpLogServer(null, "German {0} destroyed - Team scores now: RAF {1}- LW {2}", new object[] { TargetName, ScoreRed, ScoreBlue });



This should put the LW soce on line 2.
A new line

GamePlay.gpLogServer(null, "German {0} destroyed - Team scores now: RAF {1} \n LW {2}", new object[] { TargetName, ScoreRed, ScoreBlue });


A vertical tab

GamePlay.gpLogServer(null, "German {0} destroyed - Team scores now: RAF {1} \v LW {2}", new object[] { TargetName, ScoreRed, ScoreBlue })


a horizontal tab

GamePlay.gpLogServer(null, "German {0} destroyed - Team scores now: RAF {1} \t LW {2}", new object[] { TargetName, ScoreRed, ScoreBlue });

Smokeynz
04-16-2012, 04:34 AM
Hey Wolf, could be wrong but I don't think logserver output will allow wraps.

I'd suggest or try separate output command for the different lines.
As in, repeat the same line, but null out items to be missing for each(opposite sides), thus you get score for each side separate.

FG28_Kodiak
04-16-2012, 04:45 AM
for Hud output you need a timedelay, escape sequences like /n are not working.

so
[code]
double initTime = 0.0;

GamePlay.gpHUDLogCenter(... );

Timeout(initTime += 3, () =>
{
GamePlay.gpHUDLogCenter(... );
});
Timeout(initTime += 3, () =>
{
GamePlay.gpHUDLogCenter(... );
});

etc.

as an alternative for tab you can use PadRight and PadLeft for strings.

hc_wolf
04-16-2012, 07:08 AM
Thanks guys. I may use the time delay method.

I thought /n was not working.

Yes I meant LogHudDisplay. Nice pick up Kodiak... Just keeping u on your toes