randydg Posted July 17, 2005 Share Posted July 17, 2005 How do you get a npc to talk to you through the onenter= spot? Link to comment Share on other sites More sharing options...
Darth333 Posted July 17, 2005 Share Posted July 17, 2005 Check the 3rd post in this thread. I posted a sample script that does that: http://www.lucasforums.com/showthread.php?s=&threadid=143536 Link to comment Share on other sites More sharing options...
randydg Posted July 17, 2005 Author Share Posted July 17, 2005 thats different. I'm looking for a script that you can place onenter section that will activate an npc to talk to you. those look like to add an item to a locker or add an item to an npc on spawn. Link to comment Share on other sites More sharing options...
stoffe Posted July 17, 2005 Share Posted July 17, 2005 Originally posted by randydg How do you get a npc to talk to you through the onenter= spot? OnEnter event of what? The Module, the Area or a trigger? Does the NPC already exist near where the player enters, or does it need to be created? What's the Tag of the NPC? Link to comment Share on other sites More sharing options...
randydg Posted July 17, 2005 Author Share Posted July 17, 2005 OnEnter event of what? The Module, the Area or a trigger? Does the NPC already exist near where the player enters, or does it need to be created? What's the Tag of the NPC? tag=doctor1 you made the script for me awhile back but i lost it and sence the forums lost a few weeks thread, i can't find it here. and yes, npc exists near pc. Link to comment Share on other sites More sharing options...
stoffe Posted July 17, 2005 Share Posted July 17, 2005 Originally posted by randydg tag=doctor1 you made the script for me awhile back but i lost it and sence the forums lost a few weeks thread, i can't find it here. and yes, npc exists near pc. Since you didn't say what kind of object it is supposed to be an OnEnter script for, I assumed it was for the area in the below script. I think this should work: void main() { if (GetIsPlayerMadeCharacter(GetEnteringObject()) && !GetLocalBoolean(OBJECT_SELF, 40)) { SetLocalBoolean(OBJECT_SELF, 40, TRUE); object oNPC = GetObjectByTag("doctor1"); NoClicksFor(2.0); DelayCommand(2.0, AssignCommand(oNPC, ActionStartConversation(GetFirstPC()))); } } Link to comment Share on other sites More sharing options...
Darth333 Posted July 17, 2005 Share Posted July 17, 2005 Unless it doesn't fit your plans, I'd add the following line to the script: AssignCommand((GetObjectByTag("doctor1")),ActionMoveToObject(oPC)); just in case the npc is a bit too far....and it looks nice when you enter the module. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.