Visvalor
December 6th, 2009, 20:21
Ok let's say I want to define EVERY variable with scripts like
if ClassColor.getValue() == "Red" then
ClassHpVar = 9;
elseif ClassColor.getValue() == "Green" then
ClassHpVar = 6;
elseif ClassColor.getValue() == "Blue" then
ClassHpVar = 3;
else
ClassHpVar = 0;
That at the top of charsheet main and just have them as variables waiting to be called on in different numbercontrols throughout the sheet (Which will update and whatnot)
The only way it recognizes variables is by tossing them into scripts inside of controls. Do I need to write a lua file or something to get it to declare all the variables so that it's good to go before the charsheet is even open? I tried just sticking them inside of <script></script> at the top of the charsheet like you would do in a php file and it just didn't work :P
Ideas?
/edit
Also if I have to toss them into a control, that's fine but I need it to be invislbe and uneditable >_< and hold a lot of variables.
if ClassColor.getValue() == "Red" then
ClassHpVar = 9;
elseif ClassColor.getValue() == "Green" then
ClassHpVar = 6;
elseif ClassColor.getValue() == "Blue" then
ClassHpVar = 3;
else
ClassHpVar = 0;
That at the top of charsheet main and just have them as variables waiting to be called on in different numbercontrols throughout the sheet (Which will update and whatnot)
The only way it recognizes variables is by tossing them into scripts inside of controls. Do I need to write a lua file or something to get it to declare all the variables so that it's good to go before the charsheet is even open? I tried just sticking them inside of <script></script> at the top of the charsheet like you would do in a php file and it just didn't work :P
Ideas?
/edit
Also if I have to toss them into a control, that's fine but I need it to be invislbe and uneditable >_< and hold a lot of variables.