How would I have a NPC use different Dialog's depending on what room he is in?
In what situation do you need this?
In script, you could do for example
if (cGuy.Room == 3) cGuy.Say("This");
else if (cGuy.Room = 4) cGuy.Say("That");
In dialog script, use the above code with the run-script dialog script command and dialog_request (look it up in the manual or search the forum).
You could also make two versions of a dialog option with different text and enable the right one/disable the wrong one before you start the dialog, depending on which room the NPC is in:
// script for interaction: Talk to GUY
if (cGuy.Room == 3) {
SetDialogOption(1, 3, eOptionOn);
SetDialogOption(1, 4, eOptionOff);
}
else if (cGuy.Room == 4) {
SetDialogOption(1, 3, eOptionOff);
SetDialogOption(1, 4, eOptionOn);
}
RunDialog(1);
You could also run different dialogs altogether, of course.
Thank you , this should work for me just fine.
// script for interaction: Talk to GUY
if (cGuy.Room == 3) {
SetDialogOption(1, 3, eOptionOn);
SetDialogOption(1, 4, eOptionOff);
}
else if (cGuy.Room == 4) {
SetDialogOption(1, 3, eOptionOff);
SetDialogOption(1, 4, eOptionOn);
}
RunDialog(1);