![]() |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Currently, for my Skill component, I have an eval statement like the following:
Code:
<!-- Display Name without values for use on Skills Tab --> <field id="sklTabName" name="Display Name (Tab)" type="static" maxlength="50" maxfinal="50"> <finalize><![CDATA[ ~Displays name @text = field[name].text var numAoE as number var i as number var specText as string foreach pick in gizmo where "component.Specialty" i += 1 if (i > 1) then specText &= ", " endif specText &= eachpick.field[name].text nexteach if (empty(specText) = 0) then @text &= " (" & specText &")" endif ]]></finalize> </field> I think that the solution will probably involve tagmatch, but I keep getting an "Invalid id specified for tag group" error with the following replacement, even though the "Skill" group exists as an Identity tag for the skills, and both the Specialty and the Skill have a corresponding tag: Code:
foreach pick in hero where "component.Specialty" if (eachpick.tagmatch[Skill, Skill, initial] <> 0) then i += 1 if (i > 1) then specText &= ", " endif specText &= eachpick.field[name].text endif nexteach |
![]() |
![]() |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Hm... I got it working with tagsearch, but only because I know there's only one tag present.
Code:
~ There should just be one var skTag as string skTag = tagids[Skill.?] debug "Skill tag: " & skTag var specText as string foreach pick in hero where "component.Specialty" debug "Name: " & eachpick.field[name].text & " Tags: " & eachpick.tagids[Skill.?] & " tagsearch: " & eachpick.tagsearch[skTag] if (eachpick.tagsearch[skTag] <> 0) then i += 1 if (i > 1) then specText &= ", " endif specText &= eachpick.field[name].text endif |
![]() |
![]() |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
I've never had any sucess with tagmatch. I always use intersect[] for this type of testing.
|
![]() |
![]() |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Thank you.
|
![]() |
![]() |
![]() |
|
|