• 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

Question about transitioning and context

Bob G

Well-known member
Working on a custom ability that divides the possible abilities gained into a number of different categories. All abilities are classified as "Assassin Technique" and have the abCategory.Ass_tech (don't laugh). All abilities are then categorized as either Hot techniques (tag abCategory.Hot_tech) or Cold techniques (abCategory.Cold_tech). Then, finally, each ability is assigned one of eight different technique categories (e.g. Infiltration, Intuition, Poison, etc.) Each technique category has its own abCategory tag.

At first level, the user chooses four technique categories, called Specializations. This is my primary custom ability. The user must choose two "Hot" techniques and two "Cold" techniques. I want to script this so that once two "Hot" or "Cold" techniques are chosen, the remaining unchosen ones are disabled.

I was thinking about something like this,
Code:
doneif(hero.parent[cAssPoison].tagcount[abCategory.Cold_tech]>=2)
but I know my transitioning isn't right. How do I transition to the hero context so that all "Hot" or "Cold" tags are counted, and not just the ones in the current ability context?
 
I would not have all the Hot and Cold Things chosen on the same table. I would have them on two different Tables. This way if a future thing needs to give a bonus Hot you can just increase the count for that table.

You already have abCategory.? tags to use to easily separate out the Things on to Primary and Secondary tables.

In regards to your question abCategory.? tags are pushed directly to the Hero. This means your transition is simply the hero itself.

Code:
hero.tagcount[abCategory.Cold_tech]
 
I would not have all the Hot and Cold Things chosen on the same table. I would have them on two different Tables. This way if a future thing needs to give a bonus Hot you can just increase the count for that table.

You already have abCategory.? tags to use to easily separate out the Things on to Primary and Secondary tables.

Hi SC, is there a resource on the boards that can teach me about tables? Terra incognita for me.

Thanks!
 
In regards to your question abCategory.? tags are pushed directly to the Hero. This means your transition is simply the hero itself.

Code:
hero.tagcount[abCategory.Cold_tech]

Hmm, tried it out but it's not limiting the choices of cold techniques to 2. Also giving me a syntax error of "Unspecified error parsing script on line 3".
Code:
~Limit specializations to two hot techniques.
    if (hero.tagcount[abCategory.Cold_tech]>=2) then
    assign tagis[Helper.SpcDisable]
    endif
So, where's my error?
 
Hmm, tried it out but it's not limiting the choices of cold techniques to 2. Also giving me a syntax error of "Unspecified error parsing script on line 3".
Code:
~Limit specializations to two hot techniques.
    if (hero.tagcount[abCategory.Cold_tech]>=2) then
    assign tagis[Helper.SpcDisable]
    endif
So, where's my error?
Assuming if this is exact copy/paste its the no spacing. ;)

Need a space after IF and before (. Also need a space after ] and before > and a space between = and 2.
Code:
    ~Limit specializations to two hot techniques.
    if[B]space[/B](hero.tagcount[abCategory.Cold_tech][B]space[/B]>=[B]space[/B]2) then
       perform assign[Helper.SpcDisable]
    endif
In addition the last line tagis is a "Check" for a tag and assign sets a tag. I assume you just want to PERFORM a "assign" of a tag. :)
 
Hi SC, is there a resource on the boards that can teach me about tables? Terra incognita for me.

Thanks!
Nothing I can think of... Let me see if I can check the editor and give some pointers as I think the editor does not call them tables actually...
 
Disabling custom ability options

Revisiting this topic more than a year later, since I still can't get it right...

Assuming if this is exact copy/paste its the no spacing. ;)

Need a space after IF and before (. Also need a space after ] and before > and a space between = and 2.
Code:
    ~Limit specializations to two hot techniques.
    if[B]space[/B](hero.tagcount[abCategory.Cold_tech][B]space[/B]>=[B]space[/B]2) then
       perform assign[Helper.SpcDisable]
    endif
In addition the last line tagis is a "Check" for a tag and assign sets a tag. I assume you just want to PERFORM a "assign" of a tag. :)

Once the user has selected 2 hot techniques and 2 cold techniques, any other abilities that fall outside of the user's selections should be disabled:
Code:
if (hero.tagcount[abCategory.Hot_tech] >= 2) then
perform assign[Helper.SpcDisable]
    endif
What is happening is that the choice of hot/cold techniques stops after 2 are selected, but the associated abilities granted by the unselected techniques are still able to be selected.

If I want all custom abilities for a certain abCategory to be disabled, how do I code this, and on what pick should I place the script?
 
Back
Top