View Single Post
Senior Member
Join Date: Jul 2010
Posts: 2,973

Old November 5th, 2020, 06:57 AM
Originally Posted by Provos View Post
Here is the script. I just copied from Mathias post and modified it.

var crit as number
if (tagcount[wCritMin.?] > 0) then
  crit = field[chosen].chosen.tagmin[wCritMin.?]
~now, we'll subtract one from the value we looked up:
crit -= 1
~and create a tag for that new value:
var newcrittag as string
newcrittag = "wCritMin." & crit
~Weapons are assumed to have exactly one wCritMin tag,
~so we'll delete anything that already exists,
~and then assign the new tag:
perform field[chosen].chosen.delete[wCritMin.?]
perform field[chosen].chosen.assignstr[newcrittag]
Thanks. This script should work if it's on the weapon. If the script is on a material being applied to the weapon, it won't work. This is because it's looking at the tags on itself. Where is the script? Also, are you getting any errors?
Sendric is online now   #16 Reply With Quote