Jump to content

Home

Walkup to pc and start conversation


Seamhainn

Recommended Posts

Well, if you want a script on how to make an NPC WALK to the PC and start a conversation, use this:

 

void main() {
object oPC = GetFirstPC();
object oNPC = GetObjectByTag("Your_NPCs_Tag_Here", 1);

AssignCommand(oPC, ClearAllActions());
AssignCommand(oNPC, ActionMoveToObject(oPC, FALSE));
AssignCommand(oNPC, ActionStartConversation(oPC, "Your_dialogues_name_here"));
}

 

If you want the NPC to RUN to the PC, use this:

 

void main() {
object oPC = GetFirstPC();
object oNPC = GetObjectByTag("Your_NPCs_Tag_Here", 1);

AssignCommand(oPC, ClearAllActions());
AssignCommand(oNPC, ActionMoveToObject(oPC, TRUE));
AssignCommand(oNPC, ActionStartConversation(oPC, "Your_dialogues_name_here"));
}

 

Couldn't find the thread, though. Hope this helps!;)

 

|I|

Link to comment
Share on other sites

I'm not sure if it was something else I did, but whenever I tried this, the NPC in question would talk to me, but from a distance; he'd never walk up to me. So I learned that to make this work properly, you have to add several empty nodes at the beginning of the dialog, so that the NPC will actually walk up to you before talking.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...