Apologies if any1 is facepalming. Bare with me here.
I wrote an appilcation to function as a calculator in VB, so I have migrated my code into C++.
Now I wanted to create an object in which the player can call like a weapon, where the user presses “C” for calulator.
Right so here is where the help needs to come in.
I obviosly need to create a mesh and a texture, however how am I going to get it actually functioning in the sense of accepting the Users entered numbers?
How do I go about creating an interface that will accept mouse inputs, or even numpad inputs and do the calculation and return the result to an embedded LCD display on my mesh?
I have been looking into doing Slate or scaleform (Though i dont think it is used in this way).
Right so I started very simple with my calculator, first by adding triggers for when the player overlaps them it takes factors into account.
Here is the basic setup so far, going to extend this once I get a Non-scientific calculator model from my brother, then we’ll extend it to Scientific calculator with SIN/COS/TAN functions.
I did a try to see if i could do something. At first, i use a line trace system in my project to detect enemies, allies, usable items or activable items so i built a blueprint with a plane and 10 buttons in and set the buttons with an over effect on component from linetrace. (But you can reach same point by using boxes and overlap detection on component too)
Then in construction script, i set an array with all buttons stored in right order and i call the index. A text render upon where you set text : text append new click value and a code variable. when both length are equal i check if variables are equal then print yes or no and clean text after 2s delay. The last button is to reset when desired.
there would have some changes to do for having a length modifiable for example, but it works.
About hand action : I suppose at first step an overlap to know if character is close enough and then an anim of the fingers : Closing the hand except index which socket is moved to button clicked location, but as i never did anim it maybe different and there wil have some relative/world loc to define to not have weirds.