ChangeToStandardFaction(object, int)

Changes a creature's faction to one of the four standard factions.

void ChangeToStandardFaction(
    object oCreatureToChange,
    int nStandardFaction
);

Parameters

oCreatureToChange

A creature whose faction you will alter.

nStandardFaction

STANDARD_FACTION_*


Description

Make oCreatureToChange join one of the standard factions ("Hostile", "Commoner", "Merchant", "Defender").



Remarks

There is currently no way to use this function to assign a creature to a non-standard faction. Use ChangeFaction instead.


Version

1.22

Example

// In the 'Actions Taken' script of an NPC's final conversation node
void main() {
  ChangeToStandardFaction(OBJECT_SELF, STANDARD_FACTION_HOSTILE);
  DetermineCombatRound();
}

See Also

functions: ChangeFaction
categories: Reputation/Faction Functions
constants: STANDARD_FACTION_* Constants


 author: Iskander Merriman, editor: Charles Feduke