Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Krysis on Sat 20/05/2006 19:13:15

Title: Global Messages as speech?
Post by: Krysis on Sat 20/05/2006 19:13:15
I know may be a stupid question, but how do I make the player character say some of the global messages?
Title: Re: Global Messages as speech?
Post by: Ashen on Sat 20/05/2006 19:32:43
What version are you using? You'll need to use the Game.GlobalMessages (http://www.adventuregamestudio.co.uk/manual/Game.GlobalMessages.htm) property (GetMessageText(..) before V2.71), e.g.:

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


I don't think there's a way to do it directly.
Title: Re: Global Messages as speech?
Post by: Akumayo on Sun 21/05/2006 21:36:48
Couldn't you shorten that too:

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


(I know I'm probably wrong, but this looks like it would work...)
Title: Re: Global Messages as speech?
Post by: Ashen on Sun 21/05/2006 23:01:18
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.
Title: Re: Global Messages as speech?
Post by: Akumayo on Sun 21/05/2006 23:03:27
I was simply looking for a more direct way  :)
Thanks for letting me know I wasn't wrong, it doesn't happen very often.
Title: Re: Global Messages as speech?
Post by: strazer on Mon 22/05/2006 09:01:14
Doesn't

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

work too?