The problem is that your outer button is attempting to access an object within a template, which is not the same as the objects generated from the template at runtime.
Your best bet for dealing with this sort of situation is to figure out some mechanism for scripting the template items to pass their data up to your outer button. This way the clones will have the same script to bubble up their data at runtime.
If you're lucky, the client will automatically show the template elements if set to invisible, in which case you can just hide the needed element and give it an onShow script.
More likely you will need to use something that requires user action, like onHover or a clickable button inside the template.
Another option is the onTextChanged event. If you're lucky, this event will fire for each text element after its cloned and filled with quest data. The only issue with this is that a series of cloned elements may fire in a somewhat random order depending on how long it takes to populate each one.
Say you have a list of quest steps
Step A has the most text
Step B has the least text
Step C has a medium amount of text
Step B fires first, then C, then A. So your emote will list the steps out of order.
Last edited by Zonx : 07-30-2010 at 06:02 AM.
|