Senior Member
Join Date: May 2013
Posts: 1,458
|
I'm trying to work through an issue with a set of picks where each additional pick has a higher cost than the previous one.
The first pick costs 4 points, then each additional pick costs an extra 2 points, cumulatively. So pick1 costs 4 points, pick2 costs 6 points, pick3 costs 8 points, etc. I tried to get clever with the following bit of scripting, but it didn't work as intended. Code:
~adjust the resource appropriately var schcount as number var cost as number foreach pick in hero where "component.School" schcount += 1 nexteach cost=2+(schcount*2) hero.child[resCP].field[resSpent].value += cost In retrospect, this behavior makes sense. It still leaves me confused, though, as to how to make this work. |
#1 |
|
|