Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
As I have covered before, I have a situation where Skills in my system (Planet Mercenary) can have Specialties added to them under certain circumstances (namely, specialties are particular to a given skill, most specialties are unique and can only be added once, and you can't have more specialties than you have ranks in the skill). At the time, it seemed the easiest way to do it was by borrowing some code from the Doctor Who implementation and setting up a Gizmo on the skills so that I could set up field that limited the Specialty choices to those that match up to the skill.
Code:
<portal id="prtSpec" style="tblNormal"> <table_dynamic component="Specialty" showtemplate="SpecPick" choosetemplate="SpecPick2" scrollable="yes" alwaysupdate="yes" candidatepick="SpecHelp" candidatefield="SpecExpr" addpick="SpecHelp"> <titlebar><![CDATA[ @text = "Add a Specialty" ]]></titlebar> <!--headertitle><![CDATA[ @text = "Specialty" ]]></headertitle--> <additem><![CDATA[ @text = "Add Specialty" ]]> </additem> </table_dynamic> </portal> Code:
<procedure id="SetSpcExpr" context="pick"><![CDATA[ ~make sure there's a gizmo to travel to doneif (isgizmo = 0) ~set up our tag expression for selecting appropriate specialty var expr as string var myId as string expr = "component.Specialty & " & myId debug "expr: " & expr gizmo.childfound[SpecHelp].field[SpecExpr].text = expr ]]></procedure> TL;DR: Is there any way to set the "target" of the table to be the Hero instead of the Skill? Since skills are never deleted, there should never be a situation where it matters where the Specialty resides. I can also provide more code. I'm trying to only quote the relevant bits. |
#1 |
|
|