View Single Post
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old January 20th, 2017, 09:53 AM
Quote:
Originally Posted by Illyahr View Post
Ran into an issue that I'm having trouble with. There are feats/abilities in the Rokugan Campaign Setting that allow you to select cross-class skills and add them as class skills and I'm having trouble getting it to script properly

This is what I have so far. Kolat Agent ability "Broadened Skill Base" has two "Broadened Skill" things bootstrapped. The feat "Versatile" will have similar coding once this one is done.

Code:
      ~ If we're disabled, do nothing
      doneif (tagis[Helper.FtDisable] <> 0)

      call fTargetFoc
      doneif (state.isfocus = 0)

      ~ Add chosen to class skills
      var index as number
      var target as string
      target = field[fChosen].chosen
      index = hero.child[cHelpKol].assign[ClassSkill.target]

      ~ Add 1 to our chosen skill
      focus.field[Bonus].value += 1
Any thoughts?
"target = field[fChosen].chosen" isn't going to do anything. You need to point it to a tag or a field or something. Like this:

Code:
target = field[fChosen].chosen.tagid[thingid.?]
Incidentally, you can always test your variables with with the "debug" command.

For example, if you add the line "debug target" at the bottom of your script, then recompile, you can see what target is set to by going Develop -> Floating Info Windows -> Show Debug Output in your portfolio.
Sendric is offline   #2 Reply With Quote