Junior Member
Join Date: Dec 2007
Posts: 5
|
I am in the process of creating the ninja character class from CA and have gotten stuck calculating the ki points for the character's various abilities. The points are calculated by gaining 1 point for every two levels plus points equal to the character's wisdom bonus. I can calculate the points for levels just fine but have not been able to add the wisdom bonus.
Here is what I have so far: ~ set ki points for levels var level as number level = field[xTotalLev].value / 2 level = round(level, 0, 1) field[hTotal].value = level I've tried using the following code to add to the level total but apparently this doesn't work: var bonus as number bonus = hero.child[aWIS].field[aModBonus].value Can anyone help? |
#1 |
Junior Member
Join Date: Dec 2007
Posts: 5
|
I figured out the problem. I was in the wrong phase. I needed this to occur in the PostAttr phase and it worked like a charm.
Here is the code I used in case it helps anybody else out: ~ set ki points for levels var level as number level = field[xTotalLev].value / 2 level = round(level, 0, 1) ~ add wisdom bonus var bonus as number bonus = hero.child[aWIS].field[aModBonus].value var total as number total = level + bonus field[hTotal].value = total This will display the ki points in the charges section. |
#2 |
|
|