Originally Posted by
greybeardgunner70
Is there a specific way you have to add multiple functions to a window? Harn uses an average of three attributes to establish the skill base for a skill. Below you can see the script I added for endurance, acrobatics, and climbing. But it will only display in one (climbing, the last one), which makes me think it will only do one function without some added text. These work individually, so I know the scripts are correct. I just dont how to get them to all run at once.
function onValueChanged()
local nodeWin = window.getDatabaseNode();
local nstrength = DB.getValue(nodeWin,"strength_attribute",0);
local nstamina = DB.getValue(nodeWin,"stamina_attribute",0);
local nwill = DB.getValue(nodeWin,"will_attribute",0);
local nendurance = math.ceil((nstrength+nstamina+nwill)/3);
nodeWin.getChild("endurance").setValue(nendurance) ;
end
function onValueChanged()
local nodeWin = window.getDatabaseNode();
local nstrength = DB.getValue(nodeWin,"str_attribute",0);
local nagility = DB.getValue(nodeWin,"agl_attribute",0);
local nagilitytotal = math.ceil(nagility*2);
local nacrobaticstotal = math.ceil(nstrength+nagilitytotal);
local nacrobaticsaverage = math.ceil(nacrobaticstotal/3);
nodeWin.getChild("acrobatics_average").setValue(na crobaticsaverage);
end
function onValueChanged()
local nodeWin = window.getDatabaseNode();
local nstrength = DB.getValue(nodeWin,"strength_attribute",0);
local ndexterity = DB.getValue(nodeWin,"dexterity_attribute",0);
local nagility = DB.getValue(nodeWin,"agility_attribute",0);
local nclimbingaverage = math.ceil((nstrength+ndexterity+nagility)/3);
nodeWin.getChild("climbing_average").setValue(ncli mbingaverage);
end