• 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

Hide.Special Timing

Frodie

Well-known member
I am trying to hide a class special on a new bloodline (it's a copy of the Sor -Draconic and it's abilities). The ability is the breath weapon and it appears at 9th, 17th and 20th level. I have 3 copies of the same script and it works fine, but I can only get 2 of the 3 times it appears to hide. What would be the best timing for this:

doneif (hero.childlives[rcFGCoWBWG] + hero.childlives[rcFGCoWBWQ] + hero.childlives[raFGCoWBW] <> 1)

perform hero.childfound[cFGCoWBWpn].assign[Helper.SpcDisable]
perform hero.childfound[cFGCoWBWpn].assign[Helper.Obsolete]
perform hero.childfound[cFGCoWBWpn].assign[Hide.Special]

Seems one script at first 500 and one at final 80000 works fine, but I can't get the third script timing to work. Any ideas?
 
I have 3 copies of the same script and it works fine, but I can only get 2 of the 3 times it appears to hide. What would be the best timing for this:
Your very question has your answer. You have three copies of a Pick so you have Three Instances of the same Pick in memory. But your script you listed only is going to go after "one" of those Instances.

You have to change the script to find all three instances. :) You would do this with a "foreach loop" so that you loop through each instance of the Picks in memory. The hero.childfound[] only goes after the "first" random instance in memory.

The text from the HL wiki says the following for childfound[]: "Transitions to the pick context corresponding to the first pick within the container that derives from the thing with the id specified. This transition is identical to "child[id]", except that the existence of the child pick is optional. If the child is found, the transition occurs normally. If the child does not exist, no run-time error is reported, although the transition still fails to resolve."

The foreach wiki text says: "This form of "foreach" iterates through the picks that have been added to a container, processing only those that satisfy the specified set of criteria. With this version, the "context" must specify the container, which can be any valid context transition that identifies a container (e.g. "hero" or "child[pickid].gizmo"). The code within the "foreach" block is invoked for every pick in the container that satisfies the optional tag expression. Within the "foreach" block, the current pick being iterated can be accessed via the "eachpick." script context transition."
 
Back
Top