PDA

View Full Version : I need a few scripts and hints


Ataris
07-18-2008, 06:31 PM
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.

Canderis
07-18-2008, 07:21 PM
try to be more discriptive or know 1 can help you (give good details of exactly what you want it to do)

Tupac Amaru
07-19-2008, 05:53 AM
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));
}

Ataris
07-26-2008, 08:47 AM
That helped, thanks