Jump to content

Home

NPC


Ravager

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 7 months later...
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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...