Senior Member
Join Date: May 2015
Posts: 830
|
I am trying to write a similar adjustment to the Equipment, Add Trackable but have it automaticlly apply to all scrolls.
I have it down to: Code:
~ Set shorter live name field[livename].text = "Equipment, Trackable" ~ If we're not enabled, get out now doneif (field[pIsOn].value = 0) foreach pick in hero where "gType.Scroll" ~ Add Gear Uses tag perform eachpick.assign[Helper.UsesQty] ~ Add Weapon Tracker tag perform eachpick.assign[User.Tracker] ~ Set tracker amount eachpick.field[trkMax].value += int(eachpick.field[usrSource1].value) nexteach |
#1 |
Senior Member
Join Date: May 2015
Posts: 830
|
Bueller Bueller
|
#2 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
usrSource1 isn't the right field to be looking, that stores a number which determines what state of thing the selector chooses (whether the selector picks from picks or things).
I think what you're trying to do is count the number of spells on the scroll and the number of times each spell is duplicated, right? In that case, you're going to have to nest a second foreach to go through all the spells inside the container. Code:
foreach pick in eachpick.gizmo from BaseSpell ~ count stuff nexteach |
#3 |
|
|