Hi
How can I make the global messages look like someone's line? Because when I run a global message, it shows it in the white background! I want it to look like as if it is being said by that character.
thx
I think you're trying to make a character besides the player say something right, if so:
character[...].Say("INSERT TEXT HERE");
Put the character's script name where ... is
You can also use the Script-O-Name (and probably should, as it's easier to type). I.e.:
cNpc.Say("Insert text here");
This is exactly the same as character[NPC].Say but, as I said, quicker to type. Either way will work, though.
EDIT: Thanks, Khris. Damn sticky capslock being right above the shift key...
It's cNpc.Say("..."); :=
I know that! But I wanted to use the global messages. Like, when the character interacts with something that would not do anything, u would put some different things that he can say and randomly select one. And if I want to change the sayings, all I have to do is to change the global messages. But if I use character.say(), then it would not be universal!
Sorry, that's what happens when I read a reply, but not the actual question...
What you want is in the Manual: Game.GlobalMessage (http://www.adventuregamestudio.co.uk/manual/Game.GlobalMessages.htm), e.g.:
player.Say(Game.GlobalMessage[527]);
Will have the player say Global Message 527.
To randomly select from a couple of messages:
int Mess = 500+Random(5);
player.Say(Game.GlobalMessage[Mess]);
Will randomly display one of messages 500-505.
(For earlier versions, use GetMessageText.)
There's no more direct way, AFAIK. Out of curiousity, why are you using Global Messages anyway? There can't be that many cases where they're easier to use for speech than just scripting it.