How do I expression edit percentages?
Hey all. Quick question. Here's an example.
The user can BET 25, 50, 75, or 100 percent of their current score on one of my levels. I have no idea how to code this in the expression edit. So if lets say they BET 50 percent of their score of 100, and the lose... I want the score to now be 50. Any ideas or suggestions would be greately appreciated! Many thanks!
The user can BET 25, 50, 75, or 100 percent of their current score on one of my levels. I have no idea how to code this in the expression edit. So if lets say they BET 50 percent of their score of 100, and the lose... I want the score to now be 50. Any ideas or suggestions would be greately appreciated! Many thanks!
Comments
For 25% multiply the score by .25
…
Or have it divide the percentage by 100 and multiply by the score so it automatically does the math and it does it for all the percentages.
Like ex. (game.percentage/100)*(game.score)