Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Picture this scene...

Page: 1 of 1
 goldberry
12-24-2005, 5:56 PM
#1
I have two Sith standing in the middle of Tarris Upper City South (Renamed Yavin 4 Slums), a master, and an apprentice. The master is a "Predator", and the apprentice is "neutral". I have it so that when you talk to the apprentice, he babbles on about being stronger than his master, and that one day he will *be* the master. The master has a series of choices you make in his dialogue, and if you choose the right ones, I have the apprentice change from "Neutral" to "prey".

When the apprentice kills the master, I want his dialogue to change to something like "hahahaha! I am the master now!", how would I do this?

p.s. I then hope to expand it so you can bad mouth him, and fight, and kill, him.
 REDJOHNNYMIKE
12-25-2005, 12:34 AM
#2
What do you mean by Predator and Prey exactly?
 RedHawke
12-25-2005, 12:37 AM
#3
^^^^
They are part of the games NPC factions system...
 REDJOHNNYMIKE
12-25-2005, 1:07 AM
#4
Well, I've yet to play around with that, and was wondering what predator and prey entailed?

They are NPC Factions in the game, used in cutscenes and the like. To give a more detailed answer would bring the thread makers question off topic... -RH
 Darth InSidious
12-26-2005, 7:57 PM
#5
Try the "Talk-Fight-Talk sequence" how-to in the General Modding Tutorials section - it'll be listed with a link in the "Table of Contents" :)
 Darth333
12-26-2005, 8:09 PM
#6
You can use the "On death" event of the master.

Use something like this in the On Death event:

void main()
{
AssignCommand((GetObjectByTag("my_npc_tag")), ActionStartConversation(GetFirstPC(), "my_dlg", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));
}
 goldberry
12-27-2005, 8:29 AM
#7
thanks Darth, but i am kinda new to scripting... i don't suppose you could give a tad of an explaination, could you?
 Darth333
12-27-2005, 11:15 AM
#8
I modified my script above as part of it was uneeded.

If you look at the npc .utc file, you should see a field called OnDeath. This is where you have to attach your script so it is fired when the npc dies.

You will find more on Creature events and USerDefined events here:
http://nwn.bioware.com/forums/viewcodepost.html?post=762559)
http://nwn.bioware.com/forums/viewcodepost.html?post=762682)
(It's for nwn but it applies to Kotor as well)

This part: AssignCommand((GetObjectByTag("my_npc_tag")) assigns a command to your other npc when the master dies. Replace my_npc_tag by the apprentice's tag.

Then this part: ActionStartConversation(GetFirstPC(), "my_dlg", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE));
Tells the npc to start conversation with the pc: ActionStartConversation(GetFirstPC(),
Tells thew npc which .dlg to use: "my_dlg" (replacemy_dlg with the resref of the .dlg file you want to use.
FALSE indicates that it is not a private converstation.
CONVERSATION_TYPE_CINEMATIC: the type of conversation, the other choice being CONVERSATION_TYPE_COMPUTER which gives you the computer interface.
and finally TRUE: since you mentioned that it was for use after a battle, this will start the conversation "without requiring to close the distance between the two object in dialog".

Look at nwscript.nss for more details.
 goldberry
12-27-2005, 3:43 PM
#9
that was so simple, even I understand!

Thanks alot darth, you seem to be my main helper on this board.
Page: 1 of 1