GetLastSpeaker()

Determines the last creature that was communicated with.

object GetLastSpeaker();

Description

Use this in a conversation script to get the person with whom the PC is conversing. Returns OBJECT_INVALID if the caller is not a valid creature.



Remarks

If called within a conversation (e.g., as part of the "StartingConditional" script for a PC line of text AFTER the NPC has spoken previously), the function will not return the last NPC speaker, but will return OBJECT_INVALID.

The value is apparently set after the whole conversation with an NPC is completed, not after each line of conversation. This means you can't use this function during a conversation to grab the tag of the NPC that is speaking.


Version

1.31

See Also

functions: ActionPauseConversation | ActionResumeConversation | ActionStartConversation | EventConversation | GetPCSpeaker | IsInConversation
categories: Conversation Functions
events: OnConversation Event


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