
Hello, I started to play with custom sheets. HTML/CSS wiki was good and helped me to make sheet I wanted. But then I got to Sheet Worked Scripts and in this case the Wiki did not told me much. I tried to make simple worker based on that and it does not work, can someone help? I would like to have following: str and dex as number which can be raised and lowered (that seems to work) acrobatics to be counted automatically as str + dex . (does not work) What am I doing wrong? <div class="sheet-col">
<label>Strength:</label><input type="number" name="attr_str" value="0" /><br/>
<label>Dexterity:</label><input type="number" name="attr_dex" value="0" /><br/>
<hr/>
<label>Acrobatics:</label> <input type="number" name='attr_acrobatics' disabled="true" />
</div>
<script type="text/worker">
on("change:str change:dex", function() {
getAttrs(["dex", "str"], function(values) {
setAttrs({
acrobatics: values.dex + values.str
});
});
});
</script> Thanks in advance!