View Full Version : npc walk to pc and start convertion.

07-22-2007, 04:11 PM
I have made a script that makes an npc walk to you and start and convertion

void main() {
object oNPC=GetObjectByTag("jedim");
location lMe=GetLocation(GetFirstPC());
AssignCommand (oNPC,ActionForceMoveToLocation(lMe,FALSE));
AssignCommand (oNPC, ActionStartConversation(GetFirstPC()));

2 questions is there some errors in the script and where in the dialog shall i put the scirpt?

07-23-2007, 11:59 AM
There are no errors in the script.

You would not put this script in the dialog however since the script must fire first so that dialog can begin. You'll have to use some other event like a trigger, an opening door, entering an area, the ending of some other conversation, etc.

07-23-2007, 12:04 PM
Thanks tk102 . Oppening door could work but what if the doors in the module are open? Is there som way to close them?