Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: JudgeDeadd on Thu 04/09/2003 17:06:49

Title: How to speak global messages?
Post by: JudgeDeadd on Thu 04/09/2003 17:06:49
How to make global messages to have them spoken by characters?
Title: Re:How to speak global messages?
Post by: Scorpiorus on Thu 04/09/2003 17:49:35
Hello, JudgeDeadd

Use GetMessageText() function to retrieve the message then ordinary DisplaySpeech() to display:

string buffer;
GetMessageText(<message number>, buffer);
DisplaySpeech(EGO, buffer);

Were I you I would make a special function:

//main script

function DisplaySpeechMessage(int CharID, int message_number) {

 string buffer;
 GetMessageText(message_number, buffer);
 DisplaySpeech(CharID, buffer);

}

//script header

import function DisplaySpeechMessage(int CharID, int message_number);



now in script, for example:

DisplaySpeechMessage(EGO, 501);


Hope it helps ;)

PS Welcome to the forums

-Cheers
Title: Re:How to speak global messages?
Post by: Ishmael on Thu 04/09/2003 17:52:54
Just curious... In what group is the GetMessageText function?
Title: Re:How to speak global messages?
Post by: Scorpiorus on Thu 04/09/2003 17:58:13
Quote from: TK on Thu 04/09/2003 17:52:54
Just curious... In what group is the GetMessageText function?
It's a string group function,TK ;)
Title: Re:How to speak global messages?
Post by: JudgeDeadd on Thu 04/09/2003 18:19:53
TX :)
Title: Re:How to speak global messages?
Post by: Ishmael on Fri 05/09/2003 17:57:52
Hmm.. couldn't see it.... gotta check it again... :P And maybe pinch myself...