How to speak global messages?

Started by JudgeDeadd, Thu 04/09/2003 17:06:49

Previous topic - Next topic

JudgeDeadd

How to make global messages to have them spoken by characters?
You know what they say... no... wait... you don't. What a shame.

Scorpiorus

#1
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

Ishmael

Just curious... In what group is the GetMessageText function?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Scorpiorus

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 ;)

JudgeDeadd

You know what they say... no... wait... you don't. What a shame.

Ishmael

Hmm.. couldn't see it.... gotta check it again... :P And maybe pinch myself...
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SMF spam blocked by CleanTalk