I dont know any plugin, but you can event it, I dont know how to do the AC,
sin, cos, tan functions though because I dont know where it is used.
the other part is easier.
but I think a plugin is smoother, depending how it used or where it is used,
to see how complex it is to be able for evented way or plugin.
i tried eventing it but it does not work, like you need a number input, or place value multiplier per digit
what i mean is i combine it with a picture button plugin. when player clicks the 1 button first, then 2 for the second, it should be 12, but i cant get the place values to work per press of digit. let's say it's a 9 digit calculator.. how do you do it such that successive press is the value added to the next place value?
Are you trying to event this? You would need 2 variables, one to hold the increasing value and one to hold the number pressed. PseudoCode
Clear the increasing value variable
Variable1 = 0
When the user presses a numerical button (0-9), that number goes into Variable2. Then Variable1 is multiplied by 10 and Variable2 is added to it.
So, first press, Variable1 = 0, Variable2 = 1, Variable1 = 0*0+Variable2=1.
Next press is 2, Variable2 = 2, Variable1 = 1*10, add Variable2, 10+2 = 12
Third press is 7, Variable2 = 7, Variable1 = 12*10 or 120, add Variable2, 120+7 = 127.
Continue until a non digit is pressed. Store Variable1 in another variable, probably an array, reset Variable1 to 0 and continue the process until the next non-numerical number is pressed.
If this were just a simple + - x / calculator, this would be easy, tedious but easy. But it looks like you want to make a scientific calculator and that could get convoluted really quickly. Do you need a full fledged scientific calculator or do you just need something that will give you the sin of a degree, which I think you'll need to convert to radians, and the cos, arc, tan and so on? Because if you need to do something like
(sin(90)/7^5*SquareRoot(62)-arc(55))/(6^3+(SquareRoot(3)*pi))=
I think every element would need to be stored as an array element, then, when finally = (or ENTER) hit, you'd extract each element as a string, concatenate that string, and use an Eval function to get the answer.
But if you just need to get one simple cos() or one simple sin(), it should be completely doable with common events.
thanks lady_jj and dev_with_coffee.. i will try improve the eventing.. im using tomoaky's variable window and button picture plugin. the event just goes to input first value, then input second value, then choose operation..
but as you said if i have to convert the strings to operation, maybe 111_inputform would be a better choice than an onscreen calculator..
so far no luck on this request. cant find the game i saw having this one
so far, eventing can be a little pain too, if you do the simple math on windows pc
calculater:
2 + 2 + 2 * 5 = output is 30 while the original correct answer would be 14.
so eventing it is also something else.
which a plugin can handle them better.
I dont know how to deal with that, same with a keypad which can have
the same logic mostly on numbers alone (so adding the logic for + - x : etc
should be added and read correctly from there as well.
good luck on it and hope someone with knowledge can build it.
but why do you want to use it inside MV as you can use a phone for calculator?
unless you make a calculator game 😛