It's a simple formula. (X-10)/2 rounded down to the nearest whole number.
This is what I have so far:
var a = this.getField("str")
event.value = (a.value -10)/2
But that just does the math part, and not the rounding down. I know math.floor is used, but not how. Thanks to anyone who can help!
event.value = Math.floor((a.value - 10) / 2);
Note that it's Math, not math.
Your answer worked for me
You're a boss
I had the same problem (but mine was originally written a lot easier, Strength/2-5) and it worked but I needed it to round down
final code is
var a = this.getField("Strength")
event.value = Math.floor((a.value - 10) / 2)