Junior Member
Join Date: Jan 2012
Posts: 14
|
On how I would eval script a rebuke undead class ability that scales off of character level rather than class level?
|
#1 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Your character level is kept separate from your class level. There are a number of ways to do it, but the herofield[tLevel].value is your total character level. Your class level is kept on your class helper, so if you are talking Cleric, the class level is kept in hero.child[cHelpClr].field[cTotalLev].value (I think). You can find these fields by going to the Develop>Floating Info Windows>Show Selection Fields on both the Hero (totals) and the cHelpXXX appropriate helper file.
Since there is no real information on how you are trying to accomplish this, I'm making an assumption that you are using the xTurning special, and that it isn't calculating correctly. So you will need to access the hero.child[xTurning].field[Value].value and subtract the class levels, then add in the character levels. Time needs to be after Post-levels/20000. |
#2 |
Junior Member
Join Date: Jan 2012
Posts: 14
|
Hit another road block I keep getting an error for the script:
~ If we're not shown, just get out now doneif (tagis[Helper.SpcDisable] <> 0) ~ This character can turn undead var result as number result = hero.assign[Hero.TurnUndead] ~ Add our character level to our turning level.hero.child[xTurning].field[Value].value = hero.child[xTurning].field[Value].value + field[cTotalLev].value Ideas? Last edited by EmptyEternity; April 2nd, 2012 at 04:33 AM. |
#3 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
Code:
~ This character can turn undead perform hero.assign[Hero.TurnUndead] Quote:
Code:
~ Add our character level to our turning level. hero.child[xTurning].field[Value].value = hero.child[xTurning].field[Value].value + field[cTotalLev].value Last edited by Sendric; April 2nd, 2012 at 06:06 AM. |
||
#4 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Don't forget to bootstrap xTurning to this, otherwise it won't be able to find it and will return errors. When you get an error, it's always good practice to tell us exactly what error you get, verbatim. That way, we can help much better.
|
#5 |
|
|