
I have the following script that is not doing anything as far as I can see: <script type="text/worker">
on("change:merciful", function() {
getAttrs(["Merciful"], function(values) {
setAttrs({
Cruel: 20-Merciful;
});
});
});
</script>
For explanation, Merciful and Cruel are two attributes defined in the html like this: <input class='sheet-traits sheet-carac2' type="number" name="attr_Merciful" value="10" />
<input class='sheet-traits-right sheet-carac2' type="number" name="attr_Cruel" value="10" /> I am totally stumped. i have tried copying sheetworkers from roll20 character sheets that manipulate numbers, and I just cant get them to do anything. Where am I going wrong?