Junior Member
Join Date: Sep 2013
Posts: 20
|
Hello I have created a new racial trait. However, the benefit of the trait is determined by the constitution score.
Code:
~ If we're disabled, just get out now doneif (tagis[Helper.SpcDisable] <> 0) #situational[hero.child[svAll],"+X vs. spell & spell-like abilites",field[thingname].text] I simply do not know how to insert X into the statement. However, I can follow example code. Well, I scripted a solution. If anyone would like to show me some cleaner code, especially on daisy-chaining "if's" instead of something like "&&", I would appreciate it. I also, couldn't get a "string &= "blah blah"" to compile inside of a #situational Code:
~ If we're disabled, just get out now doneif (tagis[Helper.SpcDisable] <> 0) var str as string if (#attrvalue[aCON] < 4) then str = "+0" endif if (#attrvalue[aCON] > 3) then if (#attrvalue[aCON] < 7) then str = "+1" endif endif if (#attrvalue[aCON] > 6) then if (#attrvalue[aCON] < 11) then str = "+2" endif endif if (#attrvalue[aCON] > 10) then if (#attrvalue[aCON] < 14) then str = "+3" endif endif if (#attrvalue[aCON] > 13) then if (#attrvalue[aCON] < 18) then str = "+4" endif endif if (#attrvalue[aCON] >= 18) then str = "+5" endif str &= " vs. spell & spell-like abilites" #situational[hero.child[svAll],str,field[thingname].text] Last edited by Dirtydeedz; September 4th, 2017 at 11:23 PM. Reason: Solution |
#1 |
|
|