I'm modifying the Talk function in an attempt to show the text centred at the bottom of the screen, along with the name of who is doing the talking.
I'm approaching this the same way as described
in this thread.
However, I don't want to specify the duration for each line. It should work by default like the normal Talk function.
Does the WME scripting language have a function for counting the number of characters in a string? I'm guessing no since it's not in the manual, but who knows. I need a way to have an adaptive default duration for my hacked talk function. If there's another way let me know.
Okay, second issue is having the name there of the character who is talking.
First I was thinking I should do something like
if actor isTalking --> char = "Mike"
load entity Sally
if Sally isTalking --> char = "Sally"
load entity Larry
if Larry isTalking --> char = "Sally"
etc. [not actual code, obviously]
But that seems so awkward and wrong that I haven't even tried it yet.
Is there an easy way to retrieve the name of the object that is talking at any time?
Thanks for the assistance, as usual.
Marek