ShadowChemosh
Well-known member
Its performing an action to assign the Helper.ClassSkill tag to the User Chosen Skill that was selected from the Drop Down box. On the trait Thing their is a section called Custom Expression that lists what Things will show up in the drop down box. So that last line is saying what ever skill is chosen by the user is to get the Helper.ClassSkill tag.Looking at the Mathematical Prodigy trait I see this:
#applybonus[BonTrait,hero.childfound[skKnowArca],1]
#applybonus[BonTrait,hero.childfound[skKnowEng],1]
perform field[usrChosen1].chosen.assign[Helper.ClassSkill]
I understand lines 1 and 2 give the +1 bonus to the two knowledge skills. But could someone please break down line 4 for me so I can understand what each thing does?
HL uses a scripting language and not a HLL(High Level Language) so sometimes you have to take things in smaller steps for it. use the following code instead:Also, I'm trying to create a script for an ability that lasts 1 round per 2 cleric levels. This is what I have, but it doesn't work. Can someone tell me why?
field[abSumm].text = "Inflicts a -2 penalty to attacks, skills and saving throws for " & (hero.child[cHelpClr].field[cCleric].value)/2 & " rounds."
I also want to say thanks again to everyone for all of your help.
Code:
var Dur as number
Dur = round(hero.child[cHelpClr].field[cCleric].value/2,0,-1)
field[abSumm].text = "Inflicts a -2 penalty to attacks, skills and saving throws for " & Dur & " rounds."
So first do the calculation then combine the numeric number into the string.
Hope that helps.