I have a bunch of racial custom specials chosen via configurable that need to stack (taking them multiple times has increasing effects).
Most of them I can code using the following to assign Helper.FirstCopy as needed
But there is a problem. The ability has one or more choices (via usrChoice1, etc.) I only want the abilities with the same choices counted when I am trying to assign Helper.FirstCopy.
For example, let's call my ability ABILITY which allows the user to select and ability score (Abil1) and a natural weapon (NatWep).
Now, I have two instances of ABILITY selected multiple times
ABILITY (Abil1, NatWep1) and ABILITY (Abil2,NatWep2).
I want something like the above code to run, but assign FirstCopy to the first instance of each case.
Most of them I can code using the following to assign Helper.FirstCopy as needed
Code:
~ see if a quickfind has been created by another copy of this ability
perform quickfind.setfocus
~ if we didn't find a redirection, we're the first copy of this ability to run this script, so we'll make ourselves the FirstCopy.
if (state.isfocus = 0) then
perform quickadd
perform assign[Helper.FirstCopy]
~ SPECIFIC CODE
~ otherwise, redirect hero.child[] to the FirstCopy, and make us an upgrade
else
perform focus.redirect
~ SPECIFIC CODE
endif
But there is a problem. The ability has one or more choices (via usrChoice1, etc.) I only want the abilities with the same choices counted when I am trying to assign Helper.FirstCopy.
For example, let's call my ability ABILITY which allows the user to select and ability score (Abil1) and a natural weapon (NatWep).
Now, I have two instances of ABILITY selected multiple times
ABILITY (Abil1, NatWep1) and ABILITY (Abil2,NatWep2).
I want something like the above code to run, but assign FirstCopy to the first instance of each case.