Spoken Global Messages.

Started by Nine Toes, Thu 15/01/2004 15:21:15

Previous topic - Next topic

Nine Toes

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?
Watch, I just killed this topic...

Scorpiorus

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

Ishmael

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.
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