Gamecache is really the only "safe" way to get a value from a character. You could use a Str2Int return bug, but there are issues with saving/loading and unknowns with the string table (may change throughout the game).

For amateur developers like me, you might want to include valid sample "y" values in your comments. The first value I tried was 150...needless to say, I couldn't see the message.

It doesn't actually seem to be centering for me, and I'm assuming it's because I'm on a widescreen. The values are a little off to the left. I doubt you can do anything about it...just thought I'd let you know. The effect is still good.

For amateur developers like me, you might want to include valid sample "y" values in your comments. The first value I tried was 150...needless to say, I couldn't see the message.

Oh, the y value is the same as for regular game messages, i.e. you typically want it to be 0. In general, it's value should be between zero and one I believe.

Quote:

It doesn't actually seem to be centering for me, and I'm assuming it's because I'm on a widescreen. The values are a little off to the left. I doubt you can do anything about it...just thought I'd let you know. The effect is still good.

Hmm, tricky. They were a bit to the left for me too when I was testing it in windowed mode, however in fullscreen (on 3:4 or 4:5 monitors) it was nicely centered in all resolutions, so I just assumed it was a window-mode issue.

Anyway, because I find widescreen monitors to be a stupid invention, I'll keep the current x offset value, but if you want you can always modify it in the DisplayCenteredTextToPlayer function, you could even make it a variable and allow players to change it in a menu or something.

Oh yeah, I found the right 'Y' value through trial and error. Any decent developer would probably already know. I'm going with .3 for most of my messages.

Like I said, don't worry about the wide screen. Nothing to be done about it anyway, unless like you said I want to go to the trouble of letting them change it. If I do, I'll be sure to share the code changes with you so you can update the script if you like.