Getting global messages to display as speech

Started by remixor, Thu 01/05/2003 05:49:19

Previous topic - Next topic

remixor

Hi, another question from your resident AGS idiot.

I'm trying to get global messages to display as character speech, but I can't figure out how to to do that other than to check the "Always display as speech" option, which I don't want to check in case I need to display messages as text boxes.  I tried "DisplaySpeech" but that requires a string input, not an integer referring to a message.  How can I get around this?  I assume it's a simple solution I just can't figure out.
Writer, Idle Thumbs!! - "We're probably all about video games!"
News Editor, Adventure Gamers

miguel

I think you´ll have to input text using displayspeech, I had to do it.
It should be an option to declare global messages to be displayed as speech or normal messages, don´t you think?
Working on a RON game!!!!!

ThunderStorm

There's an option "Always display text as speech" in the game options tab.

scotch

Put this in your global script:

function SayMessage(int person, int message) {
 string buffer;
GetMessageText (message, buffer);
DisplaySpeech(person, buffer);
}

and this in your script header:

import function SayMessage(int , int);

Then you can use the function like
SayMessage(0, 998);

which should make character 0 say 'You run your hands up and down you clothes.' (unless you changed that message of course)

miguel

thanks for that scotch, I will use it myself
Working on a RON game!!!!!

Scummbuddy

Or, you could select that option to use all messages like text, and then when you would actually need the text box, create it as a gui or something, and have it called for.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

remixor

Thanks a ton, scotch.  I never would have thought of that but it makes total sense  ;D
Writer, Idle Thumbs!! - "We're probably all about video games!"
News Editor, Adventure Gamers

SMF spam blocked by CleanTalk