Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   Why is this not working? (http://forums.wolflair.com/showthread.php?t=60923)

Illyahr July 14th, 2018 06:27 AM

Why is this not working?
 
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

I have the feat apply the [User.Tao] tag at First/1000.
Each additional taking of the feat requires your max void points to be 3 higher. Any advice is appreciated

Sendric July 16th, 2018 03:26 AM

I would need more information to debug this. What about it isn't working? Also, why are you adding 5 to the tao variable?

Illyahr July 19th, 2018 03:57 PM

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

ShadowChemosh July 19th, 2018 04:38 PM

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

Then go to "Develop->Floating Info Windows->Show Debug Output". Then try and add the feat to a character and the debug output will get displayed.


All times are GMT -8. The time now is 02:13 PM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.