View Single Post
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 466

Old October 1st, 2023, 07:40 AM
I am trying to use a string, stored in the field "abText", as a thingID in a script, but I do not know how to do that properly.

I have tried
Code:
~ We calculate the bonuses for Elemental Augmentation

var AttBon as number
var AttTarget as string

foreach pick in hero where "abCategory.AMSAffin & Affinity.? & Helper.FirstCopy"
  AttBon = round(eachpick.field[abValue3].value/2,0,-1)
  AttTarget = eachpick.field[abText].text
  hero.child[AttTarget].field[aPostMod].value += AttBon
nexteach
but the "hero.child[AttTarget]" part does not work, even though the abText field that AttTarget refers to contains the thingID of the ability score I want to use.

Any pointers on how to properly convert a string to an thingID? Thanks!
Lord Magus is offline   #1 Reply With Quote