Why Can't Foreach Loops be Used in Creation Scripts?
The following code:
Code:
<creation><![CDATA[ Quote:
|
Code:
foreach pick in hero from component where "the tags" |
I added in the component:
Code:
foreach pick in hero from Class where "ClassLevel.?" I didn't know the from Component was required. The wiki example doesn't have it: Code:
foreach pick in hero where "group.tag" Code:
foreach pick in hero where "system_tag.minion" |
Usually specifying the component is important, otherwise you're searching through all the picks on the actor having the tag...
I'd say lookup foreach context in the kitwiki and read it. I'm not sure if you can use a foreach loop during a creation script, as you usually set field limitations and default user values with a creation script. I think creation scripts are for preadvancement phase characters. Once a character is locked for advancement those scripts are done running. What are you trying to do specifically with your foreach loop? What are you trying to tell the compiler to do? |
1 Attachment(s)
Oh this is just one of my convoluted schemes to try and get sequential ordering of the class rows in the level column of the class level table like the d20 system. I was trying to make class picks not unique, give each one a separate level tag for the character level at which it was added, and display that in the level portal of the table dynamic.
To be completely clear about the ultimate goal, I've attached a screenshot. I hope it's helpful. |
Table Dynamic Element in the wiki
look for: orderfield="" You don't need a foreach loop for that... |
Quote:
|
Quote:
|
Thanks, that makes me feel a little less of an idiot :).
|
All times are GMT -8. The time now is 12:18 PM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.