View Single Post
CapedCrusader
Senior Member
Volunteer Data File Contributor
 
Join Date: Aug 2009
Posts: 1,550

Old March 18th, 2021, 04:41 PM
What I meant was you only need to do one foreach loop. You only need to go through the Powers once.

It can't do stacked if's like that. However, one advantage of tags is we can do this:

Code:
if (eachpick.tagis[SPCPower.spcSCFire] + eachpick.tagis[SPCPower.spcSCBeast] + 
        eachpick.tagis[SPCPower.spcSCBeuty] + eachpick.tagis[SPCPower.spcSCChaos] <> 0)  then
Since all you are looking for is if any one of those tags is active.

And then just put in another if statement for the next group of Powers... In your example the second if can go inside the same foreach loop. No need to do a second one.

_
Currently In Development: Savage Pathfinder, SWADE Fantasy Companion
Future Development: SWADE Super Powers Companion, SWADE Sci-Fi Companion
_
Currently Running: Savage Unity Inc. (homebrew multiverse theme)
Setting Files Supported: Deadlands: Reloaded, Flash Gordon, Gaslight, Hellfrost, Interface Zero 2.0, Seven Worlds, Slipstream, Solomon Kane
Future Setting Files: Savage Judge Dredd
CapedCrusader is offline   #17 Reply With Quote