Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Nine Toes on Thu 15/01/2004 15:21:15

Title: Spoken Global Messages.
Post by: Nine Toes on Thu 15/01/2004 15:21:15
I'm sorry... I'm clueless....

I'm sure this is an easy one to tackle, and I'm sure I've passed over the solution in the book many times... but...

How do I display a global message as speech?
Title: Re:Spoken Global Messages.
Post by: Scorpiorus on Thu 15/01/2004 15:43:22
If you want all messages to be disaplayed as speech then tick always display text as speech.

Else if it's just one message then a custom function can be written:

function DisplayMessageSpeech(int message) {
int value = SetGameOption(OPT_ALWAYSSPEECH, 1);
DisplayMessage(message);
SetGameOption(OPT_ALWAYSSPEECH, value);
}

~Cheers
Title: Re:Spoken Global Messages.
Post by: Ishmael on Fri 16/01/2004 19:23:26
Or, if you want a certain character to speak a global message:

function SpeakGlobalMessage(int CharID, int message) {
string msgstr;
GetMessageText(message,msgstr);
DisplaySpeech(CharID,msgstr);
}

Just a thought... I'm not sure if I put the GetMessageText parameters wrongvice(sp?), as I'm not on my own computer so I can't check with the manual.