Seamhainn Posted August 29, 2008 Share Posted August 29, 2008 Hello! A couple of weeks ago there was a thread about how a npc can walkup to the pc and initiate a conversation. I searched with various keywords, but with no success. Can someone point me in the right direction, please? Thanks Link to comment Share on other sites More sharing options...
Istorian Posted August 29, 2008 Share Posted August 29, 2008 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 More sharing options...
Robespierre Posted August 30, 2008 Share Posted August 30, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.