Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
if (field[fChosen].chosen.tagis[Helper.NatPrimary] <> 0) then
|
#21 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
|
#22 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Sorry, didn't even look at the first line.
foreach and field[fChosen].chosen are two different ways of finding things - only use one or the other - you can't just merge them. |
#23 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
I'm surprised that code didn't give you any error messages.
(If it did give you error messages, then right-clicking them, copying them, and pasting them into your post when you said it wasn't working would have sped up figuring out what was wrong). |
#24 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Quote:
That is why I attempted to do the "foreach actor in portfolio" because I thought all the actors (heroes) in a portfolio were live. Turns out, only the active hero is live. The other heroes are only live long enough to produce their output, but seem to go non-live when they are not active (which strangely doesn't change their output to the screen). So, unless there is a way to make all things live outside of the current hero you are working with, none of the relevant tags and fields that are set up for the things on a Race will be available until it is live. That's what I meant when I said that was as far as I was willing to go. Now you could do the custom tags, but you would have to statically custom tag each race just to get the results you want. Editing each race to do that would be a monumental task, just to add a lot of custom tags to each one that worked with your Alternate Form, Change Shape, Wild Shape, etc. |
|
#25 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
Code:
foreach bootstrap in field[fChosen].chosen where "component.BaseNatWep & thingid.wBite" if (field[fChosen].chosen.tagis[Helper.NatPrimary] <> 0) then perform hero.child[wBite].assign[Helper.NatPrimary] endif nexteach I don't think this will work without the foreach because the thing being chosen is a race. So, the goal here is to figure out if something bootstrapped to the chosen object has the Helper.NatPrimary tag associated with it. |
|
#26 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
Ahh...that certainly explains it. Sorry. I guess I wasn't fully understanding the initial problem. |
|
#27 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Quote:
For example, it does find the bootstraps on the race just fine, it can't find the things that are bootstrapped to that bootstrap found though, since that bootstrap isn't live to allow the tags to be assigned. I keep finding all kinds of things that can be done in the Wiki, amazing resource. Gotten to understand it so well, thinking of designing my game in it from scratch, for my personal use of course. Last edited by Kendall-DM; May 11th, 2012 at 10:19 AM. |
|
#28 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Oh yeah, right, didn't notice that. You wouldn't be able to find the Helper.NatPrimary on the Race, good catch. That's what I get for not paying attention.
|
#29 |
|
|