void main()
{
ClearAllActions();
object oPC = GetEnteringObject();
object oNPC = GetObjectByTag("NPCTAG");
AssignCommand(oNPC, ActionStartConversation(oPC, "NameOfConversation"));
}
This script goes in the on enter event of a generic trigger. When the PC enters the trigger the npc will move towards them and start a conversation. Place your NPC's tag where NPCTAG is and the name of the npc's conversation file where NameOfConversation is and your good to go.
Known issues: the npc will start dialouge everytime the trigger is fired. I am expirimenting today with getting and setting local variables to fix this. Another possible work-around is doing a DestroyObject(OBJECT_SELF) command at the end of the script to destroy the trigger after it does it has done its duty.
__________________
Support Local Music and Record Stores!
Got Liberty?
|