In today’s video tutorial I will show you a typical usage of Number controls to create some bonus field with a rollable total (with a pretty straightforward LUA code).
Sorry, the LUA code is blurred in the video for the most part, here is the code:
function onInit()
addSourceWithOp("mod1", "+");
addSourceWithOp("mod2", "+");
addSourceWithOp("mod3", "-");
super.onInit();
end
Note that mod3 is declared as subtracting instead of adding to the total.