IsInConversation(object)

From NWN Lexicon
Jump to navigationJump to search

Determines whether an object is in conversation.

int IsInConversation(
    object oTarget
);

Parameters

oTarget
Object to check.


Description

This function returns TRUE or FALSE based on the conversation state of the target. Use this function to conditionally execute behavior based on the target's conversation status. For instance you should make sure ambient animations do not fire during a conversation to stop the NPC wandering off.

You can use GetPCSpeaker to find out who is in conversation with OBJECT_SELF, but not if oTarget is another object.

In the special case of a conversation with more than one speaker, both the conversation owner and any NPC who is merely tagged on a conversation line are regarded as "in conversation".


Version

1.22

Example

if (IsInConversation(OBJECT_SELF))
{
   // Do some stuff while talking
}
else
{
   //Do some stuff while not talking
} 

See Also

functions: 

GetPCSpeaker



 author: Michael Nork, editor: Jeff Lindsey