GetCurrentFriend

From NWN Lexicon
Jump to navigationJump to search


GetCurrentFriend()

Get the caller's current friend.

Description

Get the caller's current friend.



Remarks

Returns the local object stored in "NW_ANIM_FRIEND". If not found returns OBJECT_INVALID.

Requirements

#include " x0_i0_anims "


Version

???

Example

// See if the critter has a friend, if they do, have them rejoice.
#include "x0_i0_anims"

void main()
{
  // Check for a friend
  object oBud = GetCurrentFriend();

  // If the calling object has a friend, have them rejoice.
  if(GetIsObjectValid(oBud))
  {
    SpeakString("Yay, I have a friend!", TALKVOLUME_TALK);
  }
}

See Also

functions: 

SetCurrentFriend



author: Baragg, editor: Mistress