Apologies for asking the same question twice (/54/88/313233/1.html), but I need to finish a project for someone and I'm still really not sure if my solution is the best one.
Brief recap. I'm trying to make something that enables the end user easily to configure talking objects by notecard, so, for example, if you and most of your friends don't have English as your first language you don't have to hug/kiss them in a foreign language all the time.
If I'm dealing with variables for which I have values when I read the notecard (the owner's name, for example) that's easy; I can use placeholders in my notecard and assign values inside the dataserver event.
But what do I do with a variable for which I don't yet know the value, like the name of the avatar I'm kissing?
My tentative solution is to write a notecard line like "%FirstName% gives %Target% a %AnimName%", substitute the owner's first name (since I already know that) for %FirstName% in the dataserver event when I read the notecard.
Then, each time I come to hug or kiss someone, I grab my target's name with llDetectedName(0) and turn it into a firstname, check what I'm doing to him, and then use some sort of string replacement function to fill in the appropriate values.
This just feels wrong somehow -- as if there's a more elegant and less cumbersome way of doing it that's somehow eluding me.
In short, what do I write in a notecard to get the same results as llSay(0, strOwnerName + " gives " +strTargetName + " a big " + strAnimName), given that I don't know who/what strTargetName and strAnimName represent when I read the notecard?