SetPCLike(object, object)
From NWN Lexicon
Causes two PCs to "Like" each other.
Contents |
[edit] Parameters
- oPlayer
- Player to like.
- oTarget
- Target to alter the feelings of.
[edit] Description
Sets oPlayer and oTarget to like each other. "Like" is a neutral, non-hostile stance towards oTarget.
[edit] Remarks
There are three diplomatic stances between PCs:
- Like is a neutral, non-hostile stance towards oTarget.
- Party is a friendly stance towards oTarget.
- 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.
This obviously will not work if the PCs are in the same party, as they automatically like each other.
This function only works on PCs. Including an NPC in the mix appears to do nothing.
[edit] Version
1.29
[edit] Example
// The PC who entered the trigger is set to like all the PC's 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 like them object oPC = GetFirstPC(); while (GetIsObjectValid(oPC)) { // Set to like SetPCLike(oEnterer, oPC); // Get next PC oPC = GetNextPC(); } } }
[edit] See Also
functions: | SetPCDislike |
author: Charles Feduke, editor: Jasperre, additional contributor(s): Harald Schuster