Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
Illyahr
Senior Member
 
Join Date: Feb 2013
Posts: 357

Old July 14th, 2018, 06:27 AM
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
Illyahr is offline   #1 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old 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?

Last edited by Sendric; July 19th, 2018 at 05:37 AM.
Sendric is offline   #2 Reply With Quote
Illyahr
Senior Member
 
Join Date: Feb 2013
Posts: 357

Old 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
Illyahr is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old 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.

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.
ShadowChemosh is offline   #4 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:08 PM.


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