Hello again. I’m having problems trying to obtain PC’s party members. GetFirst/GetNextPC doesnt tell me if theyre in the same party or not and doesnt account for associates. Am I missing something obvious again?
You need to use GetFirst/NextFactionMember()
to cycle through a PC’s party. If the second parameter is TRUE
, it limits it to PCs only.
Example:
void main()
{
object oPC = GetFirstPC();
object oParty = GetFirstFactionMember(oPC);
while (GetIsObjectValid(oParty))
{
SendMessageToPC("Found party member: " + GetName(oParty));
oParty = GetNextFactionMember(oPC);
}
}
You can also cycle through a PC’s associates using GetAssociate()
until it returns OBJECT_INVALID
.
1 Like
Excellent. Thank you. That’s nailed it