Senior Member
Join Date: Jul 2010
Posts: 149
|
I've been using custom expressions to build lists of creatures of particular types and sizes using the following basic formula:
Code:
(HasType.tpMonHuman & (RaceSize.Small11 | RaceSize.Medium0)) I need to construct a custom expression that builds a list of Large-sized giants. |
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
You might try nested foreaches. Not generally recommended because it can be expensive for the processer, but could work...
Something like: Code:
var finalexpr as string var tempstr as string foreach thing in BaseRace where "HasType.tpMonHuman & (RaceSize.Small11 | RaceSize.Medium0)" tempstr = "Race." & eachthing.idstring ~ If our current iterated race has the correct subtype bootstrapped, then add the temporary string for this race to the final candidate expression foreach bootstrap in eachthing where "component.Subtype & thingid.stGiant" finalexpr = splice(finalexpr,tempstr, " | ") nexteach nexteach field[usrCandid1].text = finalexpr Last edited by Aaron; January 21st, 2015 at 07:51 PM. |
#2 |
|
|