ChangeFaction(object, object)

From NWN Lexicon

Change a creature's faction to that of another.

void ChangeFaction(
    object oObjectToChangeFaction,
    object oMemberOfFactionToJoin
);

Contents

[edit] Parameters

oObjectToChangeFaction
The creature whose faction is to change.
oMemberOfFactionToJoin
The creature whose faction will be joined.

[edit] Description

Make oObjectToChangeFaction join the faction of oMemberOfFactionToJoin.

[edit] Remarks

Although placeables can be given factions, they cannot be used as oMemberOfFactionToJoin.

PCs cannot change factions.

[edit] Version

1.61

[edit] Example

// Used in an "Actions Taken" conversation node when a PC
// has persuaded an NPC to join an interesting convent...
void main()
{
  object oNun = GetNearestObjectByTag("SisterOfPerpetualIndulgence");
  ChangeFaction(OBJECT_SELF, oNun);
}

[edit] See Also

functions:  ChangeToStandardFaction


 author: Iskander Merriman, editor: Lilac Soul, additional contributor(s): Lilac Soul

Personal tools
Categories