I want to display the value of a variable during gameplay, so I have to split the variable to make each number parsable for Mugen. But how do I "merge" those variables back into one again?
var(1) + var(2)?But seriously I think you want something like var(1) + (Var(2)*10) + (var(3)*100)so if var 1 =9var 2 =6var 3 =4you'd get 469 as your result. It may be easier to just use an additional variable for the original value that doesn't get split.
Odb718 said, December 15, 2017, 03:13:32 amvar(1) + var(2)?But seriously I think you want something like var(1) + (Var(2)*10) + (var(3)*100)so if var 1 =9var 2 =6var 3 =4you'd get 469 as your result. It may be easier to just use an additional variable for the original value that doesn't get split. But how do I prevent the numbers to get higher than 9?Because if I want to do it like this:var(1) + (var(2)*10)anim = 1000 + var(2)anim = 1000 + var(1)and if one of the vars equals 10 or higher, Mugen won't show the numbers correctly
Are you using VarAdd to increment each var?Instead of adding 1 each time have it check if it's 9, in which case subtract 9 making it 0 againVar(1) = Cond(var(1) = 9,-9,1)
Why do you need 3 variables to begin with? If you want to store a 3 digit number, you could simply use a single variable and display the different digits with arithmetic operators
XGargoyle said, December 16, 2017, 03:17:25 pmWhy do you need 3 variables to begin with? If you want to store a 3 digit number, you could simply use a single variable and display the different digits with arithmetic operatorsYou mean likevar(1) full variablevar(2)=var(1)%10 onesvar(3)=(var(1)/10)%10 tensvar(4)=(var(1)/100)%10 hundreds
There is probably no need to use var(2),(3)or(4).Where ever those variables are being used, you could use the math (var(1)%10) instead.