Junior Member
Join Date: Aug 2013
Posts: 9
|
I've looked everywhere and can't seem to find reference to figure out if a class special ability is disabled. I am adding some user data through the editor and need to write a script to check if it is disabled.
any help would be appreciated. |
#1 |
Junior Member
Join Date: Aug 2013
Posts: 9
|
anybody with a suggestion, your help would be appreciated.
|
#2 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
The only thing that comes to mind is to look for the tag 'Helper.SpcDisable' on the special.If the tag exists, its disabled.
|
#3 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
I believe he wants to know if a class ability is available to the class, which I believe is determined by a conditional check against the level. This level is on the Class Special, which you should be able to compare to the hero's class level to determine if it is active. Does that help?
|
#4 |
Junior Member
Join Date: Aug 2013
Posts: 9
|
Sendric had the correct idea. I will try that again but I believe the class special abilities have a different naming convention from the generic special abilities. Thanks for the ideas and feel free to keep them coming. Anything helps.
|
#5 |
Junior Member
Join Date: Aug 2013
Posts: 9
|
*UPDATE*
I was trying to add a class special that would add my charisma modifier to my saving throws from level two and on. Here is the code that ended up working for me. var level as number level = herofield[tTotLevel].value if (level >= 2) then ~ Add charisma bonus to saves hero.child[vFort].field[Bonus].value = hero.child[vFort].field[Bonus].value + hero.child[aCHA].field[aBonus].value hero.child[vRef].field[Bonus].value = hero.child[vRef].field[Bonus].value + hero.child[aCHA].field[aBonus].value hero.child[vWill].field[Bonus].value = hero.child[vWill].field[Bonus].value + hero.child[aCHA].field[aBonus].value endif |
#6 |
Junior Member
Join Date: Aug 2013
Posts: 9
|
if there was an easier way to do this, I would definitely like to know for future reference.
|
#7 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
For reference, you don't need the variable for your initial if statement. You could easily truncate that to: [code] if (herofield[tTotLevel].value >= 2) then [code] As for the rest, I can't remember if there is a way to add to all saves at once in one line. I'm not at a computer with HL installed, but you could look at the adjustments. I believe there is one that does all, and that might show you a way to do all at once. EDIT: Ok, I guess there isn't an adjustment that does all three. My bad. Looking at the cloak of resistance, it appears your method is about as efficient is it will get. Last edited by Sendric; August 19th, 2013 at 05:54 AM. |
|
#8 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
Code:
hero.tagis[Hero.WildShape] <> 0 Last edited by Sendric; August 19th, 2013 at 06:03 AM. |
|
#9 |
|
|