Announcement

Collapse
No announcement yet.

Issues With a Script Not Working

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issues With a Script Not Working

    Howdy all,

    Been trying to get all of my house rules coded into Hero Lab, and I'm getting a confusing issue with one. Effectively all I'm trying to do is create a flaw with 3 potential ranks, and have the maximum rank for it be determined by the parent power's range. Specifically, personal range effects can have up to all 3 ranks of the flaw, while all other ranges can only have up to 1. Here's the script I've been trying to use:

    ~ Add an appropriate maximum rank for this flaw
    if (parent.tagis[pwRange.Personal] <> 0) then
    perform assign[MaxRank.3]
    else
    perform assign[MaxRank.1]
    endif
    Now, as far as I can tell (based on looking up similar scripts and comparing), this should do exactly what I want. And yet, for whatever reason, it seems to have no actual effect, as any power I attach this flaw to is still being allowed to take all 3 ranks, regardless of its base range. Anybody have any idea as to what I'm missing? I'm just about completely stumped. If there are any questions or I haven't properly explained things, please let me know.

    Thanks in advance for any help!

  • #2
    I'm not at my desktop computer, and won't be until late tonight, but my impulse is that you need to check which phase that script is running on. It could be it's happening later than when MaxRank is being checked.
    [url=http://roninarmy.com/threads/996]My Builds[/url]

    [b]Current games:[/b]
    [url=http://www.echoesofthemultiverse.com/viewtopic.php?f=15&t=839]The J.V. Team (GM)[/URL]

    Comment


    • #3
      Hm, I did briefly try fooling around with different phases and priority, but perhaps not well enough. I was just editing a copy of an existing flaw, with a pre-existing script, so perhaps I just need to make a totally separate eval script box with different timing and such. Iíll give it a try when I can. Thanks for the suggestion!

      Comment


      • #4
        Ah, and poking around a bit more, MaxRank is a tag. If you're going to assign a new value, you need to remove the old one. Turn on Data File Debugging and take a look at the tags. See if the one is assigned that you're expecting. Alternately, you can send me the .user file and I can take a look at it.
        [url=http://roninarmy.com/threads/996]My Builds[/url]

        [b]Current games:[/b]
        [url=http://www.echoesofthemultiverse.com/viewtopic.php?f=15&t=839]The J.V. Team (GM)[/URL]

        Comment


        • #5
          Success! Evidently it was a timing thing, and I just needed it to occur waaaay earlier than I thought. Had to use Initialization as the phase, with a priority of 800. But it's working perfectly now. Thanks for being a true hero FB!

          Comment


          • #6
            Not at all. You can find me on the Lone Wolf forums as well.
            [url=http://roninarmy.com/threads/996]My Builds[/url]

            [b]Current games:[/b]
            [url=http://www.echoesofthemultiverse.com/viewtopic.php?f=15&t=839]The J.V. Team (GM)[/URL]

            Comment

            Working...
            X