Image

Imagedevolve_absolve wrote in Imagejavascript 😊calm

Listens: Korn - Everything I've Known

Hey there folks, I was just wondering about something.



I want to have 4 seperate buttons which each add 1 to an assigned variable. I'll be using PHP to set the max amount of individual units that can be set (much like in Diablo II, for example, 5 points over 4 variables, no more, no less), and once this has been decided, it will then all go to a database.



VARIABLEBUTTON EFFECT
Var1Var1++; X++;
Var2Var2++; X++;
Var3Var3++; X++;
Var4Var4++; X++;



Current Total: X

Total Available: Y



X !> Y



Var1New + Var2New + Var3New + Var4New = Y




yeah I know, it's messy, but that's all I could think of to put down as clarification. Pointers to articles and such appreciated as always :)