Thread: Two questions
View Single Post
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old January 27th, 2016, 11:52 AM
trkMax is something you're setting in a <fieldval> on the item, right?

You're not setting it in a script?

Because <creation> scripts are run only one time, when that pick is first added to the character, and then never run again, if you're setting the trkMax in a script, then it's too late - the creation script has already run.

If you are setting the trkMax in a script, then your creation script would need to look like this:
Code:
<creation><![CDATA[
  ~if we'll be resetting to our maximum, then set our starting value to a very big number, which will later be corrected to be the maximum by the field's <bound> script
  if (tagis[Helper.ResetMax] <> 0) then
     field[trkUser].value = 9999999999
     endif
   ]]></creation>
Mathias is online now   #12 Reply With Quote