I'm trying to understand some behavior here, and to figure out the best way to implement some conversations.
As an example, in an OnClientEnter script I have some conditional code that creates an NPC and fires a conversation. It looks like this:
iLoc = GetLocation(oPC);
iPSpeaker = CreateIPSpeaker("triel_guard_runner", "triel_guard_runner", iLoc, 1.0f);
//DelayCommand(1.0f, AssignCommand(oPC, ActionStartConversation(oRunner, "triel_guard_runner", FALSE, FALSE, TRUE, FALSE)))
Initially, I had the DelayCommand() call uncommented. When it is uncommented, it fires the conversation immediately upon entering the area (which is what I want).
However, according to what I've read, it seems that CreateIPSpeaker is supposed to handle everything for me automatically, without the need for the AssignCommand/ActionStartConversation call.
But here's the issue I noticed: if I comment out the DelayCommand line, it can take several seconds for the conversation to fire, at which point in time the PC and party may have already run off several yards away from the NPC (triel_guard_runner) who they are supposed to converse with. The conversation happens, but by now they are beyond shouting distance and it look silly.
Also, if I exit the previous area and enter this area using one of the companions, it can take even longer for the CreateIPSpeaker to fire the conversation.
So what is the correct way to set all this up to ensure the conversation fires and fires quickly upon entering the area? Am I using CreateIPSpeaker wrong? Do I even need to use it at all in this instance? When is the appropriate time to use CreateIPSpeaker()?





Retour en haut






