Difference between revisions of "ChangeFaction"

From NWN Lexicon
Jump to: navigation, search
(Restored page content lost during the Attack of the Spambots)
 
Line 22: Line 22:
  
 
PCs cannot change factions.
 
PCs cannot change factions.
 +
 +
===Version===
 +
1.61
 +
 +
===Example===
 +
<nwscript>
 +
// 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);
 +
}
 +
</nwscript>
 +
 +
===See Also===
 +
{| class="seealso"
 +
| width="1px" align="right" valign="top" | <font color="gray">functions: </font>
 +
| [[ChangeToStandardFaction]]
 +
|}<br />
 +
----
 +
<font color="gray">  author: Iskander Merriman, editor: Lilac Soul, additional contributor(s): Lilac Soul</font>
 +
[[Category:Functions]]
 +
[[Category:Reputation_Faction_Functions]]

Latest revision as of 02:59, 2 April 2018

Change a creature's faction to that of another.

void ChangeFaction(
    object oObjectToChangeFaction,
    object oMemberOfFactionToJoin
);

Parameters

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

Description

Make oObjectToChangeFaction join the faction of oMemberOfFactionToJoin.

Remarks

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

PCs cannot change factions.

Version

1.61

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);
}

See Also

functions:  ChangeToStandardFaction


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