Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,748
|
How do you use DescAppend in a script?
|
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Same as any other text field. What do you want to do?
|
#2 |
Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,748
|
I am trying to add something to the tStartText
|
#3 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
The text on the Journal page? Why would you want to change that?
Anyway, DescAppend is only for picks of the ability component, it doesn't interact with herofields at all. tStartText is derived, so I think you should be able to modify it with scripts directly, after PostAttr 10000 when it is set. |
#4 |
Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,748
|
Cool, thank you
|
#5 |
Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,748
|
This the script and the error I get -
hero.child[journal].field[tStartText].text = "USD " & field[trkMax].value Hero Lab was forced to stop compilation after the following errors were detected: Syntax error in 'eval' script for Thing 'abGHMPUSD' (Eval Script '#2') on line 1 -> Attempt to access value-based field 'tStartText' as text. Sorry forgot to add the "DescAppend" in |
#6 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
The pick you transition to is incorrect. Hero fields are on the totals pick, but can be referenced with the herofield transition:
herofield[tStartText].text Are you trying to mod in a new currency type, like United States Dollars? If so, I don't think that's going to work, because the purchase mechanics are all internal. You could have a tracker on the in-play tab, but nothing you do is going to cause that to automatically go down when you buy something. |
#7 |
Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,748
|
Yea, it's a tracker and the user would have to keep track what is spent. I did try to have the tracker = the same as tMoney, but it really didn't work. But I didn't think it would.
Thank you again for your help and time! |
#8 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
No problem. Wish custom currencies was something we could set up, but that would be a major project we don't have the resources for at the moment.
|
#9 |
Senior Member
Join Date: May 2007
Location: Durham, NC
Posts: 1,748
|
NP, BTW what timing would you recommend?
I am trying this at render 10000 herofield[tStartText].field[descappend].text += field[trkMax].value but keep getting errors Hero Lab was forced to stop compilation after the following errors were detected: Syntax error in 'eval' script for Thing 'abGHMPUSD' (Eval Script '#2') on line 1 -> Reference to undeclared variable: 'herofield' Last edited by Frodie; June 2nd, 2015 at 08:40 AM. |
#10 |
Thread Tools | |
Display Modes | |
|
|