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.

Need check for party member script

Page: 1 of 1
 Master Zionosis
02-08-2007, 7:15 PM
#1
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, 10:07 PM
#2
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, 5:14 AM
#3
Brilliant, thanks Artemis, ill test that out now.
 Master Zionosis
02-17-2007, 8:35 PM
#4
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, 9:54 PM
#5
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, 10:13 PM
#6
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-18-2007, 12:15 AM
#7
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, 11:00 AM
#8
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, 3:59 PM
#9
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, 4:28 PM
#10
Excellent, thanks Hangout, ill give that a try now.
 Hangout Hermit
02-18-2007, 4:45 PM
#11
Excellent, thanks Hangout, ill give that a try now.
Let me know how it turns out. ;)
 Master Zionosis
02-18-2007, 5:01 PM
#12
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.
Page: 1 of 1