About Sierra-style speech

Started by petazzo, Thu 06/10/2005 17:51:24

Previous topic - Next topic

petazzo

 ??? I would like to make Sierra-style conversations like in King's Quest 6 where when you talk to a character the first time he says something and the next time he says something different. I read the manual but I can't find a way to obtain it.

Help me please and sorry for my terrible English.Ã,  ;D
I never forget a face, but in your case I'll be glad to make an exception.
(Groucho Marx)

Ashen

#1
That's not actually anything to do with the Sierra-style speech option, which may be why you havent found anything.

If you mean changing what's said in a dialog, you need to look at the option-on/off commands, and SetDialogOption().

Otherwise, you need to use variables:
e.g.:
Code: ags

if (tosay == 0) cNPC.Say("Hello.");
if (tosay == 1) cNPC.Say("Hello Again.");
if (tosay == 2) cNPC.Say("Can I help you?");
if (tosay == 3) cNPC.Say("Leave me alone!");
if (tosay < 3) tosay ++;
// Will say each line in sequence

Or:
Code: ags

tosay = Random(3);
if (tosay == 0) cNPC.Say("Hello.");
if (tosay == 1) cNPC.Say("Hello Again.");
if (tosay == 2) cNPC.Say("Can I help you?");
if (tosay == 3) cNPC.Say("Leave me alone!");
// Will say one of the lines at random

NOTE: You won't be able to copy-paste this code and have it work. If you're not sure about variables, look them up in the manual, search the forums, and ask back if you have any other questions - or if I've missed the point.
I know what you're thinking ... Don't think that.

petazzo

Quote from: Ashen on Thu 06/10/2005 18:23:44
Otherwise, you need to use variables:
e.g.:
Code: ags

if (tosay == 0) cNPC.Say("Hello.");
if (tosay == 1) cNPC.Say("Hello Again.");
if (tosay == 2) cNPC.Say("Can I help you?");
if (tosay == 3) cNPC.Say("Leave me alone!");
if (tosay < 3) tosay ++;


I've tryed to use that but I cannot make it works... :'( Maybe I haven't understand it well.
I never forget a face, but in your case I'll be glad to make an exception.
(Groucho Marx)

Ashen

#3
well, I did say that wouldn't work as was. What exactly have you tried? (Post your script, and if you got an error, post that as well.)
I know what you're thinking ... Don't think that.

petazzo

Ok, I've done it. ;D Thank you very much!
I never forget a face, but in your case I'll be glad to make an exception.
(Groucho Marx)

SMF spam blocked by CleanTalk