View Single Post
Old 01-27-2009, 03:53 PM   #7
Mostly dormant
stoffe's Avatar
Status: Administrator
Join Date: Apr 2002
Posts: 5,850
Helpful!  10 year veteran!  Notable contributor 
Originally Posted by Marius Fett View Post
But what I want, is for the NPC to start his own conversation with me after he spawns.
Make sure the script is run from the very last node in the conversation so the player isn't in dialog mode any more when the script has been run.
void main() {
    object oPC = GetFirstPC(); 
    location lTarget = GetLocation(GetWaypointByTag("nindenstand"));
    object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "ninden", lTarget);
    DelayCommand(1.0, AssignCommand(oSpawn, ClearAllActions()));
    DelayCommand(1.0, AssignCommand(oSpawn, ActionStartConversation(oPC, "", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE)));
(Alternatively you can just use your existing conversation to continue talking with the new NPC instead of starting a new one. Might be easier, depending on the circumstances.)

stoffe is offline   you may: quote & reply,