Senior Member
Join Date: Aug 2008
Location: Miamisburg, OH
Posts: 1,322
|
I am using the same script pulled from weapon focus, but even using that, it doesnt add a +1 to the weapon chosen.
|
#11 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Adding a damage bonus to all ranged weapons is going to be complex.
You'll need a foreach...nexteach loop to cycle through every ranged weapon on the hero. Since it already needs a foreach to modify the damage and range increment, might as well directly modify the weapon's attack bonus while we're there. timing: UserPreLv, 100 Code:
foreach pick in hero where "wCategory.Range?" eachpick.field[wAttBonus].value +=2 eachpick.field[wDamBonus].value +=2 eachpick.field[wRangeInc].value +=20 nexteach wCategory.Range? finds both wCategory.RangeProj (projectile weapons) and wCategory.RangeThrow (throwing weapons), and putting in the "?" wildcard allows the foreach loop to find both types of ranged weapons (but not wCategory.Melee or wCategory.Unarmed). Each line starts with "eachpick", which changes the context to whatever selection the foreach loop is currently working on. The "Reference Information" page I mentioned earlier, at the bottom, details weapons, which is where I found the specific fields I wanted to modify. |
#12 |
Senior Member
Join Date: Aug 2008
Location: Miamisburg, OH
Posts: 1,322
|
That seems to have done the trick, thank you. Now I can sue the same code to make some other changes I have been working at as well. Thanks again.
|
#13 |
|
|