SetPCDislike(object, object)

From NWN Lexicon

Sets two PCs to dislike each other.

void SetPCDislike(
    object oPlayer,
    object oTarget
);

Contents

[edit] Parameters

oPlayer
The PC whose attitude will be changed.
oTarget
The PC that will be the target of of oPlayer's attitude change.

[edit] Description

Sets oPlayer and oTarget to dislike each other. "Dislike" is a hostile stance.

[edit] Remarks

There are three diplomatic stances between PCs:

  1. Like is a neutral, non-hostile stance towards oTarget.
  2. Party is a friendly stance towards oTarget.
  3. Dislike makes oTarget an enemy. When moused-over, oTarget will glow with the same red aura as NPC enemies and will function the same in other ways as well (mouse changes to the sword "attack" command, etc.). If any NPC creatures under the player's command (familiar, animal companion, summons, mercs) see oTarget, they will attack immediately.

Note that these states are two-way. If you dislike another player, they will automatically dislike you. If you like someone when a state of dislike is in place, they will automatically like you as well.

If oPlayer and oTarget are in the same party, you can't force them to dislike each other as "Party" is automatically on.

This function only works on PCs. Including an NPC in the mix appears to do nothing.

[edit] Version

1.28

[edit] Example

// The PC who entered the trigger is set to dislike all the PCs in the module
void main()
{
    // Get entering PC
    object oEnterer = GetEnteringObject();
 
    // Make sure they are not a DM
    if (GetIsPC(oEnterer) && !GetIsDM(oEnterer))
    {
        // Loop all PCs in the module and set this PC to dislike them - uh oh
        object oPC = GetFirstPC();
 
        while (GetIsObjectValid(oPC))
        {
            // Set to dislike
            SetPCDislike(oEnterer, oPC);
 
            // Get next PC
            oPC = GetNextPC();
        }
    }
}

[edit] See Also

functions:  SetPCLike


 author: Tom Cassiotis, editor: Jasperre, additional contributor(s): Karl Frauendienst

Personal tools
Categories