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?
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.
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.
... 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.
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 :)
Thank you! :)
ETA: It doesn't seem to work. It fires the node without the script, even if Mission is in my party.
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.
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.
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. :)