GetFirstFactionMember(object, int)
Obtains the first member of the faction that a creature is a member of.
object GetFirstFactionMember( 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, otherwise both NPCs and PCs are included in the search. (Default: TRUE)
Description
Returns the first member of oMemberOfFaction's faction and OBJECT_INVALID if oMemberOfFaction or oMemberOfFaction's faction is invalid. If bPCOnly is set to FALSE it includes both PCs and NPCs.
Remarks
This function begins to cycle through all oMemberOfFaction's faction by calling GetNextFactionMember().
If bPCOnly is TRUE the returned faction member will be a PC.
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: | GetNextFactionMember |
categories: | Reputation/Faction Functions |
author: Tom Cassiotis, editor: Charles Feduke, additional contributor(s): Iceberg, Mike Daneman, Matt Andrew
Send comments on this topic.