Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
I am having a bit of a hard time figuring out how to keep the field for currently memorized spells on the class tab... I've used this code, but for some reason the array increments upward for every class instead of the 1 class I am trying to get it to work for.
Code:
<eval index="6" phase="Effects" priority="6000"><![CDATA[ foreach pick in hero from Spell where "SpellLevel.01" field[clMemCur].arrayvalue[0] += eachpick.field[spPrepared].value nexteach ]]></eval> RavenX Pronouns: She/Her Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you. I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Take another look at the where portion of your foreach - that needs to also include a tag that's particular to the specific class that's running this script. Without that specificity, it's finding all the spells on the character.
|
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
So the SpellSort tag for the class it's attached to? How can I access that to include it in the "the tags" part?
RavenX Pronouns: She/Her Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you. I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all. |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
You've used this sort of thing before, I know:
Code:
foreach pick in hero from Spell where searchexpr |
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Yeah I have, just not for a while. This is what I came up with and after testing it is working correctly. Thanks for helping me.
Code:
var spellclass as string spellclass = tagids[SpellSort.?] spellclass &= " & SpellLevel.01" foreach pick in hero from Spell where spellclass field[clMemCur].arrayvalue[0] += eachpick.field[spPrepared].value nexteach RavenX Pronouns: She/Her Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you. I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all. |
#5 |
|
|