GetNextFactionMember(object, int)

Obtains the next member of the faction that a creature is a member of.

object GetNextFactionMember(
    object oMemberOfFaction,
    int bPCOnly = TRUE
);

Parameters

oMemberOfFaction

Creature to determine which faction we want.

bPCOnly

If TRUE then the returned faction member will be a PC, if FALSE then the search will include both PCs and NPCs. (Default: TRUE)


Description

Returns the next member of oMemberOfFaction's faction and OBJECT_INVALID if oMemberOfFaction or oMemberOfFaction's faction is invalid.



Remarks

You must call GetFirstFactionMember with the same parameters before using this function.


Version

1.29

Example

// this code shows how you can cycle through all the party 
// members of the first PC
object oPartyMember = GetFirstFactionMember(GetFirstPC(), TRUE);
while (GetIsObjectValid(oPartyMember) == TRUE)
{
   // do something to party member
   oPartyMember = GetNextFactionMember(oPartyMember, TRUE);
}

See Also

functions: GetFirstFactionMember
categories: Reputation/Faction Functions


 author: Tom Cassiotis, editor: Charles Feduke, additional contributor(s): Tom Smallwood, Mike Daneman
 Send comments on this topic.