TheIronGolem
Well-known member
I have an ability that needs to loop through a series of custom dynamic tag groups I've made, and append each tagname it finds in each group to a string.
Basically, the groups look like this:
Then I'm dynamically adding tags to the ability with names, like "custgroup1.foo", "custgroup1.bar", "custgroup2.baz", etc, with names of "Foo", "Bar", and "Baz" respectively.
And I'd like to turn that into a string that looks like "Foo, Bar, Baz"
I figured I could do it like this:
But it turns out I was wrong to assume that there's a "tagnamestr" method. And I couldn't find any reference to one in the wiki. Is there a way to get tagnames according to a string (like tagidstr, but returning names instead of ids)? Or (as I suspect) do I need to give up on the loop and just do each group manually?
Basically, the groups look like this:
Code:
<group id="custgroup1" name="Custom Group 1" dynamic="yes"></group>
<group id="custgroup2" name="Custom Group 2" dynamic="yes"></group>
<group id="custgroup3" name="Custom Group 3" dynamic="yes"></group>
etc...
Then I'm dynamically adding tags to the ability with names, like "custgroup1.foo", "custgroup1.bar", "custgroup2.baz", etc, with names of "Foo", "Bar", and "Baz" respectively.
And I'd like to turn that into a string that looks like "Foo, Bar, Baz"
I figured I could do it like this:
Code:
var myStr as string
var i as number
for i = 1 to 3
myStr &= tagnamestr["custgroup" & i & ".?"], ", "]
next
But it turns out I was wrong to assume that there's a "tagnamestr" method. And I couldn't find any reference to one in the wiki. Is there a way to get tagnames according to a string (like tagidstr, but returning names instead of ids)? Or (as I suspect) do I need to give up on the loop and just do each group manually?