Jump to content

Home

I need a few scripts and hints


Ataris

Recommended Posts

My mod is coming along nicely. However, I have tried several different scripts (of my own) and none of them will accomplish what I want.

 

How do I make an "animated cutscene," one that doesn't involve the player in any way, but other people?

 

I need a script for setting different dialog options in the same dialog file. I know it's there, but I can't find it with the Kotor Tool.

 

I tried making a character walk towards the player during a cutscene (and even before the cutscene(conversation), but the npc will not move.

Link to comment
Share on other sites

How do I make an "animated cutscene," one that doesn't involve the player in any way, but other people?

 

Dialogs have a Speaker and Listener fields. Put the tag of the NPC who is currently talking in the Speaker and the tag of the NPC he is talking to in the Listener field. Leave the reply nodes empty. Then they will talk to each other and not the player.

 

If the conversation is started with a script you can also set the default speaker and listener of the cutscene:

 

void main () {
   object oSpeaker = GetObjectByTag("YourSpeakerTag");
   object oObjectToConverseWith = GetObjectByTag("YourListenerTag");

   AssignCommand(oSpeaker, ClearAllActions());
   AssignCommand(sSpeaker, ActionStartConversation(oObjectToConverseWith, "YourDialogFileName"));
}

 

I tried making a character walk towards the player during a cutscene (and even before the cutscene(conversation), but the npc will not move.

 

Run this script on an entry node and use a sufficient delay for that node. Replace the tag of oActionSubject with that of your character that should be walking towards the player.

void main() {
   object oActionSubject = GetObjectByTag("YourTagHere");

   // This is the object the action subject should move to.
   object oMoveTo = GetFirstPC();

   // If this is FALSE, the action subject will walk. If TRUE it will run.
   int bRun = FALSE;

   // This is the desired distance between the action subject and oMoveTo.
   float fRange = 1.0;

   AssignCommand(oActionSubject, ClearAllActions());
   AssignCommand(oActionSubject, ActionForceMoveToObject(oMoveTo, bRun, fRange));
}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...