• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Shape Changing

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.
 
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).
 
For some reason (probably cause I'm dumb), I'm having a hard time determining if the Helper.NatPrimary tag exists on something. Here's the code I'm trying and failing with:

Code:
 foreach bootstrap in field[fChosen].chosen where "component.BaseNatWep & thingid.wBite"
  if (tagis[Helper.NatPrimary] <> 0) then
   [I]blah blah blah[/I]
  endif
 nexteach

Am I taking the completely wrong approach or is my if statement just not right?

The reason that it can't pick it up is because the hero that the natural attack is one, that is has the Helper.NatPrimary tag, isn't live yet. The tag is assigned to an attack when the hero becomes live, but is not assigned when it is not live. This is because these tags are being assigned dynamically. Now, if the actual weapon, wBite for example, had the Helper.NatPrimary tag added to it in the Editor, it would always be assigned (statically) which means it would always be available. However, not every creature has that as its primary attack. Anything that is assigned to the Race itself, in the Editor, is available. Anything that is assigned to a Thing that is on the Race is not. That's why I can access the rSTR, rDEX, etc. fields, they are statically assigned. So is wBite, it is assigned to the Race. The Helper.NatPrimary is assigned to the wBite, but only when the creature is live.

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.
 
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).

There was no error when I tried combining them as such:

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 would have posted it otherwise (assuming I hadn't figured out why there was an error).

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.
 
The reason that it can't pick it up is because the hero that the natural attack is one, that is has the Helper.NatPrimary tag, isn't live yet. The tag is assigned to an attack when the hero becomes live, but is not assigned when it is not live. This is because these tags are being assigned dynamically. Now, if the actual weapon, wBite for example, had the Helper.NatPrimary tag added to it in the Editor, it would always be assigned (statically) which means it would always be available. However, not every creature has that as its primary attack. Anything that is assigned to the Race itself, in the Editor, is available. Anything that is assigned to a Thing that is on the Race is not. That's why I can access the rSTR, rDEX, etc. fields, they are statically assigned. So is wBite, it is assigned to the Race. The Helper.NatPrimary is assigned to the wBite, but only when the creature is live.

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.


Ahh...that certainly explains it. Sorry. I guess I wasn't fully understanding the initial problem.
 
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.

This actually does work Mathias. I scoured the Wiki to find it, but it says it will work, and it does in HL, you can use both.

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:
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.

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.
 
Back
Top