GetLastSpeaker()

From NWN Lexicon
Jump to navigationJump to search

Use this in the OnConversation script to get the person with whom you are conversing.

object GetLastSpeaker();

Description

Use this in the OnConversation script of an creature to get the creature who clicked them to initiate conversation or who spoke a chat line that was recognised with GetListenPatternNumber. This can be an NPC, especially in the case of hidden AI shouts using SetListeningPatterns.

Returns OBJECT_INVALID if the caller is not a valid creature.


Remarks

Confusingly named function! This is not used in the conversation scripts, instead these use GetPCSpeaker for the thing conversing and OBJECT_SELF is the person being conversed with:


Version

1.31

See Also

functions: 

IsInConversation

events: 

OnConversation Event



 author: Jody Fletcher, editor: Charles Feduke, additional contributor(s): Thomas Clark