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.

Conditional Dialog Scripts

Page: 1 of 1
 MasterWaffle
02-29-2008, 4:34 PM
#1
Quick question. If I want a certain conversation node to fire only if a certain party member is present, and a another to fire only if they are not, what scripts(s) should I use?
 Master Zionosis
02-29-2008, 4:50 PM
#2
I used this script to check if Kreia was present in my Mechanical hand mod:


int StartingConditional()
{
return(IsNPCPartyMember(NPC_KREIA) == TRUE) && (GetDistanceBetween(GetPCSpeaker(), GetObjectByTag("Kreia")) <= 25.0);
}

Change NPC_KREIA to the particular party member you want to check for and then change Kreia to the tag of the party member you want to check for.

And you wont need the other script as if the party member isn't present the NPC speaking the conversation will move onto the next node, the one where the party member won't be there.
 Sithspecter
02-29-2008, 4:51 PM
#3
I'm not a scripting expert, but if you look at the dialog files, you'll find the names of scripts in dialogs that use party members. Eg: Motta's dialog. That's what I do whenever I need a script like that.
 MasterWaffle
02-29-2008, 6:46 PM
#4
... Change NPC_KREIA to the particular party member you want to check for and then change Kreia to the tag of the party member you want to check for...
I'm not sure what the name of the particular party member is. I put:

int StartingConditional()
{
return(IsNPCPartyMember(Party_NPC_Mission) == TRUE) && (GetDistanceBetween(GetPCSpeaker(), GetObjectByTag("Mission")) <= 25.0);
}
And I get a bunch of errors when I try to compile. I have no doubt I'm doing something wrong.

I'm not a scripting expert, but if you look at the dialog files, you'll find the names of scripts in dialogs that use party members. Eg: Motta's dialog. That's what I do whenever I need a script like that.
I would do that, but the scripts are for KotOR 1, so they won't decompile (least I think they won't). And I can't read compiled scripts. At all.
 Master Zionosis
02-29-2008, 6:57 PM
#5
As your doing this for K1 there is already a preset script for each party member, for mission it is:

k_con_missionpm

use that as the conditional script :)
 MasterWaffle
02-29-2008, 7:00 PM
#6
Thank you! :)

ETA: It doesn't seem to work. It fires the node without the script, even if Mission is in my party.
 Master Zionosis
03-01-2008, 6:42 AM
#7
ETA: It doesn't seem to work. It fires the node without the script, even if Mission is in my party.

You have to have the node with the script connected above the one without it, as conversations work like cues, if the first node will run without a script then that will be the the node the conversation will go on.
 MasterWaffle
03-01-2008, 6:10 PM
#8
That's how I have it set up.

http://img151.imageshack.us/img151/3816/dlgxj7.th.jpg) (http://img151.imageshack.us/my.php?image=dlgxj7.jpg)

Should I have them as completely separate nodes?
 Master Zionosis
03-01-2008, 6:43 PM
#9
AFAIK that should work, there must be something you're doing wrong, try having them as completely separate nodes and see if that works, but it should be working.
 MasterWaffle
03-01-2008, 10:13 PM
#10
AFAIK that should work, there must be something you're doing wrong, try having them as completely separate nodes and see if that works, but it should be working.

Unfortunately it isn't. I'll just start over at this point, see if it's the file. Thanks for all your help. :)
Page: 1 of 1