How do I expression edit percentages?

delorianhayzedelorianhayze Member Posts: 55
edited August 2012 in Working with GS (Mac)
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!

Comments

  • HapiappsHapiapps Member Posts: 373
    For 50% have it multiply the score by .5
    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)
  • delorianhayzedelorianhayze Member Posts: 55
    You're a life saver! Thanks a million. Much appreciated!
Sign In or Register to comment.