SetIsTemporaryFriend(object, object, int, float)
Causes an creature to consider another creature a friend indefinitely or for a fixed time.
- The object whose reputation will be altered.
- The creature whose opinion will change (Default: OBJECT_SELF)
- If this is TRUE, the friendship decays over fDurationInSeconds; otherwise it is indefinite. (Default: FALSE)
- This is only used if bDecays is TRUE, it is how long the friendship lasts. (Default: 180.0f)
Make oSource into a temporary friend of oTarget using personal reputation by changing their personal reputation value to 100 (maximum friendliness).
This will fail if oTarget and oSource are in the same faction or party (Check with GetFactionEqual) as they can never be considered temporarily anything but what the faction in general tells them to think.
Note: If bDecays is TRUE, the personal reputation amount decreases in size over fDurationInSeconds. Friendship will only be in effect as long as (faction reputation + total personal reputation) >= REPUTATION_TYPE_FRIEND.
Due to the buggy nature of SetIsTemporaryNeutral the best way to have a creature in a hostile faction not attack a player is to use this instead. PCs won't see a "friendly" faction in green, in fact being friendly rather than neutral doesn't really do much in the game if they stay that way.
author: Tom Cassiotis, editor: Jasperre, additional contributor(s): Jasperre, chrono