Hi!
So I've been coding a Pricing minigame lately, However I've run into a problem,
Two of the inputs of my pricing minigame include adding and subtracting percentages and this is often introducing a third or fourth decimal place in my final calculation - Which considering it's supposed to be running on Money - just isn't going to work.
Is there a way I can round my decimal points in the variable formula?
Thanks!
Comments
You can get a float variable's value with:
AC.GlobalVariables.GetFloatValue (2); // For a float variable of ID = 2
And set a string variable's value with:
AC.GlobalVariables.SetStringValue (3, "My new text"); // For a string variable of ID = 3
You can safely remove SetLabel from your script, and move the code you've written there into your Run function, returning 0f as it only needs to be run once.
A more detailed description of how Actions work can be found in the ActionTemplate.cs file itself, which has comments throughout.