PDA

View Full Version : NPC


Ravager
06-29-2008, 06:23 PM
Hi! When i talk to npc he changes his position (turn face to me). How can i change this?

Exile007
06-29-2008, 06:45 PM
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...

Silveredge9
06-29-2008, 06:55 PM
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.

Ravager
07-01-2008, 05:22 PM
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?

TriggerGod
07-01-2008, 06:22 PM
that would require some scripting. It would end up being in the same .dlg file, so you wouldn't need to create a whole new dlg.

HdVaderII
07-01-2008, 08:10 PM
Globals perhaps? ;)

Ravager
07-02-2008, 09:40 AM
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.

sekan
07-02-2008, 10:51 AM
http://lucasforums.com/showthread.php?t=187487

Hope that helps

Exile007
07-02-2008, 11:16 AM
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.

Ravager
02-05-2009, 02:40 PM
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.

Star Admiral
02-05-2009, 03:01 PM
You could add this script to the script used to spawn the NPC.

- Star Admiral

Ravager
02-05-2009, 03:25 PM
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.