SetIsTemporaryFriend

From NWN Lexicon
Jump to: navigation, search



SetIsTemporaryFriend(object, object, int, float)

Causes an creature to consider another creature a friend indefintely or for a fixed time.

void SetIsTemporaryFriend(
    object oTarget,
    object oSource = OBJECT_SELF,
    int bDecays = FALSE,
    float fDurationInSeconds = 180.0f
);

Parameters

oTarget

The object whose reputation will be altered.

oSource

The creature whose opinion will change (Default: OBJECT_SELF)

bDecays

If this is TRUE, the friendship decays over fDurationInSeconds; otherwise it is indefinite. (Default: FALSE)

fDurationInSeconds

This is only used if bDecays is TRUE, it is how long the friendship lasts. (Default: 180.0f)


Description

Make oSource into a temporary friend of oTarget using personal reputation. This will fail if oTarget and oSource are in the same faction or party (Check with GetFactionEqual()) as they can never be considered tempoarily anything but what the faction in general tells them to think.

Note: If bDecays is TRUE, the personal reputation amount decreases in sizeover fDurationInSeconds. Friendship will only be in effect as long as (faction reputation + total personal reputation) >= REPUTATION_TYPE_FRIEND.



Version

1.62

See Also

functions: 

AdjustReputation | SetIsTemporaryNeutral | SetIsTemporaryEnemy

constants: 

REPUTATION_TYPE_* Constants



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