GetCurrentFriend

From NWN Lexicon


Contents

[edit] GetCurrentFriend()

Get the caller's current friend.

[edit] Description

Get the caller's current friend.



[edit] Remarks

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

[edit] Requirements

#include " x0_i0_anims "


[edit] Version

???

[edit] 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);
  }
}

[edit] See Also

functions: 

SetCurrentFriend



author: Baragg, editor: Mistress

Personal tools
Categories