View Single Post
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old June 2nd, 2014, 01:27 PM
Quote:
Originally Posted by bertraze View Post
My main problem now is that I don't get how to use a tag name that I've constructed (such as "WepProf." & field[usrChosen1].chosen. As far as I know, you can only use literal tag names in assign[].
Use assignstr to assign a tag based on a string. For example:

Code:
      foreach pick in hero from BaseWep where "IsWeapon.wShuriken | IsWeapon.wShurikenM |(Helper.Improvised & wCategory.Range?)"
        ~ Reset the value for this pick
        range = 0

        ~ Set our expanded range.
        range = eachpick.tagvalue[wRangeInc.?] + 20

        ~ Delete the old tag
        perform eachpick.delete[wRangeInc.?]

        ~ Assign the new one
        perform eachpick.assignstr["wRangeInc." & range]

        nexteach
Aaron is offline   #5 Reply With Quote