Jump to content

Home

NPC


Ravager

Recommended Posts

Posted

Depends, is this for KotOR or TSL? If the latter, then you can check the box "Doesn't Reorient on PC" in KT's creature editor. I'm not sure how you would do that for K1 though...

Posted

To stop an NPC from facing the PC during a conversation, you would use a script along the lines of...

 

void main(){

object oNPC=GetObjectByTag("NPC_TAG");
AssignCommand(oNPC, SetLockOrientationInDialog(oNPC, TRUE));

}

 

Though make sure you fire it prior to the conversation starting.

Posted

Now i need help with dialogues ;D I want to replace existing node with another when quest is complete or something is happen. How can i do that?

Posted

ehh i dont know how can i do that. i can use "script that determines availability" but i dont know how delete node by script.

Posted

You could also use a journal script for that.

 

This would be what you use for to set the conditional.

void main() 
{ 
 AddJournalQuestEntry("quest_name",1);
}

 

And this is what you could use to check the conditional.

 

int StartingConditional() {

  return (GetJournalEntry("quest_name")==1);

}

 

Replace "quest_name" with the name of your quest, and 1 with the entry the journal is on.

 

Hope this helped!

 

EDIT: Forgot about where you should attach the scripts! :lol:

 

Attach the first one at the end of the dialog node that you want to be deleted in "script to run for this node", and attach the other one on the node above it as the "script that determines availability." Make the node that you want to be deleted the one at the bottom, as the game cycles through each node to check if each conditional is available, it will keep going down until it finds something it can run.

  • 7 months later...
Posted
To stop an NPC from facing the PC during a conversation, you would use a script along the lines of...

 

void main(){

object oNPC=GetObjectByTag("NPC_TAG");
AssignCommand(oNPC, SetLockOrientationInDialog(oNPC, TRUE));

}

 

Though make sure you fire it prior to the conversation starting.

 

Somebody can tell me where i must put that script? I tried almost everythink.

Posted

void main() {
   // Check to see if it has already been spawned
   if(!GetIsObjectValid(GetObjectByTag("hodis")))
       CreateObject(OBJECT_TYPE_CREATURE, "hodis", Location(Vector(131.93,100.63,1.50), 180.0));

   object oNPC=GetObjectByTag("hodis");
   AssignCommand(oNPC, SetLockOrientationInDialog(oNPC, TRUE));    

   // Fire old script
   ExecuteScript("k_pdan_14a_areaold", OBJECT_SELF);
}

 

It doesn't work. NPC still change his position during a coversation.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...