Global Messages as speech?

Started by Krysis, Sat 20/05/2006 19:13:15

Previous topic - Next topic

Krysis

I know may be a stupid question, but how do I make the player character say some of the global messages?

Ashen

What version are you using? You'll need to use the Game.GlobalMessages property (GetMessageText(..) before V2.71), e.g.:
Code: ags

String temp = Game.GlobalMessages[500];
cEgo.Say(temp);


I don't think there's a way to do it directly.
I know what you're thinking ... Don't think that.

Akumayo

Couldn't you shorten that too:
Code: ags

cEgo.Say("%s", Game.GlobalMessages[500]);


(I know I'm probably wrong, but this looks like it would work...)
"Power is not a means - it is an end."

Ashen

No, you're quite right that works. I just wasn't sure if it would, and wasn't in a position to test it. Then I forgot all about it.

So there's a slightly shorter way, but no Character.SayMessage(..) function.
I know what you're thinking ... Don't think that.

Akumayo

I was simply looking for a more direct way  :)
Thanks for letting me know I wasn't wrong, it doesn't happen very often.
"Power is not a means - it is an end."

strazer

Doesn't
Code: ags

cEgo.Say(Game.GlobalMessages[500]);

work too?

SMF spam blocked by CleanTalk