Senior Member
Join Date: Feb 2013
Posts: 357
|
So I'm setting up a feat that gets harder to take as you get more of them but having trouble with the scripting
Code:
var void as number var tao as number void = hero.childfound[xVoid].field[hTotal].value tao = hero.tagcount[User.Tao] * 3 tao = tao + 5 if (void >= tao) then @valid=1 endif Each additional taking of the feat requires your max void points to be 3 higher. Any advice is appreciated |
#1 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
I would need more information to debug this. What about it isn't working? Also, why are you adding 5 to the tao variable?
Last edited by Sendric; July 19th, 2018 at 05:37 AM. |
#2 |
Senior Member
Join Date: Feb 2013
Posts: 357
|
Prereq is max void 5 plus 3 times number of times the feat has been taken so max void must be 5 or better to take it, 8+ for the second one, etc
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Add debug statements to test to see if the script is doing what you expect it to be doing:
Code:
var void as number var tao as number void = hero.childfound[xVoid].field[hTotal].value debug "void " & void tao = hero.tagcount[User.Tao] * 3 debug "tao tagcount " & tao tao = tao + 5 debug "tao +5 " & tao if (void >= tao) then debug "Valid TRUE" @valid=1 endif Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#4 |
|
|