View Single Post
Old 01-27-2009, 04:53 PM   #7
stoffe
Mostly dormant
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,834
Helpful! 10 year veteran! Notable contributor 
Quote:
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.
Code:
void main() {
    object oPC = GetFirstPC(); 
    location lTarget = GetLocation(GetWaypointByTag("nindenstand"));
    object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "ninden", lTarget);
    NoClicksFor(1.0);
    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.)


mt
stoffe is offline   you may: quote & reply,