Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
If gearholder is really a container, you should be able to do the foreach on the gearholder and not the hero.
Code:
foreach pick in gearholder from MyGear |
#11 |
Senior Member
Join Date: Dec 2011
Posts: 100
|
Damn, still no joy. gearholder is aparently invalid syntax for the foreach statement.
You can thank Mathias for gearholder. http://forums.wolflair.com/showthread.php?t=21663 http://hlkitwiki.wolflair.com/index....xt#transitions I tested the gearholder transition by creating an item, "monkeys", and add the eval line: Code:
gearholder.field[livename].text = "Barrel of Monkeys" Code:
field[livename].text = field[livename].text & " in a " & gearholder.field[livename.text This makes me think that there is a timing issue here as well. Based on what it says in the hlkitwiki, I think it has to be used from the point of view of the gear inside the container (like master has to be used from the minion side). That is why I thought the way to go would be to look at each piece of gear and see if the container it was in had the Location tag. |
#12 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Since there isn't a transition in the reverse direction for gearholder, here's something that may work:
Code:
foreach pick in hero from MyGear if (eachpick.isgearheld <> 0) then if (eachpick.gearholder.uniqindex = uniqindex) then ~do whatever endif endif nexteach |
#13 |
Senior Member
Join Date: Dec 2011
Posts: 100
|
Thank you Mathias! This is working perfectly.
|
#14 |
|
|