You could use the textStarted & textStopped Lua event handlers as you can query the owner of the text which you could then use to toggle a condition or something that shows the owners talk pic thing.
-- * function which handles text started actions * --
function txtStart(text)
if text.TextOwner:getId().tableId == eCharacters then
Conditions[text.TextOwner:getName() .. "_avatar"].ConditionValue = true
end
end
-- * function which handles text finished actions * --
function txtEnd(text)
if text.TextOwner:getId().tableId == eCharacters then
Conditions[text.TextOwner:getName() .. "_avatar"].ConditionValue = false
end
end
-- * initialize text event handlers * --
registerEventHandler("textStarted", "txtStart")
registerEventHandler("textStopped", "txtEnd")
Advanced warning: I wrote this off the top of my head, so it may or may not work. Add it as a definition script.
To use this script you need to create an avatar pic for each character, then create a condition & give it exactly the same name as your character and amend
_avatar as a prefix after the name. Set to false as default value & then assign the condition to the properties tab of the interface button containing the characters talk avatar or talk animation.
The script should handle the actual displaying & hiding automatically.