PDA

View Full Version : Need check for party member script


Master Zionosis
02-08-2007, 06:15 PM
Hi everyone, me again, i need a script that checks that Kreia is in your party for a certain dialog line to be available.

Thanks,

~MZ

Princess Artemis
02-08-2007, 09:07 PM
c_con_kreiapm should be the script you need to make sure she's there to trigger the dialogue. It's a universal script, so unless you need something for a character recruit mod, the c_con(charactername)pm scripts will do that for you.

Master Zionosis
02-09-2007, 04:14 AM
Brilliant, thanks Artemis, ill test that out now.

Master Zionosis
02-17-2007, 07:35 PM
For some reason that didn't work for me, but no matter, I'm not sure if I'm asking for the same thing again, probably not, but here goes, i need a script that will abort the dialog strait away if Kreia is not in your party.

Thanks,

~MZ

Dashus
02-17-2007, 08:54 PM
Is Kreia more than 10.0 units away? Because all the c_con scripts check for that minimum distance. IsObjectPartyMember is the function you want.

Master Zionosis
02-17-2007, 09:13 PM
Well, Kreia is kind of next to me so it should be alright, and I'm still not sure why its not working, i have retried it with kreia further away from me, and still no success, is there anyway i can do what i said above and abort the dialog if Kreia is not in the party?

Dashus
02-17-2007, 11:15 PM
I guess you need to clarify it a bit.

Is the dialog already started and you just want to drop out at a given point? Or are you trying to see if it should be started? Or should the dialog continue if she's not in party?

Master Zionosis
02-18-2007, 10:00 AM
I suppose the second one is more accurate, i would like a script that that doesn't allow the dialog to begin unless Kreia is in the party.

Thanks,

~MZ

Hangout Hermit
02-18-2007, 02:59 PM
Try this script....

//HH: Check for Kriea Script.

#include "k_inc_debug"

void main() {

//HH: Will check if Kreia is in the party and within 25 meters.
int hhCheck = ((IsNPCPartyMember(NPC_KREIA) == TRUE) && (GetDistanceBetween(GetPCSpeaker(), GetObjectByTag("Kreia")) <= 25.0));
{
//HH: If FALSE exit.
if (hhCheck) { return; }

//HH: Replace dlg_name with your dialog file.
//HH: If TRUE, start the dialog.
ActionStartConversation(GetFirstPC(), "dlg_name");
}
}

Master Zionosis
02-18-2007, 03:28 PM
Excellent, thanks Hangout, ill give that a try now.

Hangout Hermit
02-18-2007, 03:45 PM
Excellent, thanks Hangout, ill give that a try now.
Let me know how it turns out. ;)

Master Zionosis
02-18-2007, 04:01 PM
Grrr, it doesn't work, i have attached the script to the first line of the dialog and it didn't work, the dialog still fires if Kriea is not a member of your party.

:EDIT: Well i did some fiddling around and attached the script to the actual .utc file on the OnDialog script box and that also didn't work, is that even the right one?, Whaoo, this is turning out harder than i imagined.