Member
Join Date: Sep 2016
Posts: 55
|
Hello All.
I have a question about eval format. I have a custom movement rate (Str+Dex)/2 gives a base move number. I want to substitute that number for Speed using the Replaces Thing Id. But I am fuzzy on the script part... Here is what I have and its saying invalid script term. ~ Add Str+Dex and divide by 2 to calculate Movement hero.child[abTIMmove].value = (hero.child[aSTR].value + hero.child[aDex].value)/2 (abTIMmove = my unique value id for movement.) Thanks if anyone can give me a clue. |
#1 |
Senior Member
Join Date: Feb 2015
Posts: 676
|
Your problem lies in the use of:
Code:
hero.child[XXXX].value For example: Code:
hero.child[abTIMmove].field[abValue].value += (hero.child[aSTR].field[aFinalMod].value + hero.child[aDex]field[aFinalMod].value)/2 For a more in-depth explanation, go here and check out the second link "Location, Location, Location". On a related issue, note that I've changed your = operator to a +=. This is generally the preferred practice, because straight-up assigning a value can cause headaches if/when other things try to modify the value on that ability (for instance, a feat that adds +10 to that movement speed). Last edited by TheIronGolem; December 7th, 2016 at 02:22 PM. |
#2 |
Member
Join Date: Sep 2016
Posts: 55
|
Thank you for the input!!!
|
#3 |
|
|