Changing percentages


(Logan"Nogan" Carter) #1

How do make a percentage that goes up and down depending on what you do so 60% water and 40% land that can cause you to lose and if perfectly balanced you win?


(Jacob Albano) #2

Well, the easiest way is just have two values:

var water:int;
var land:int;

Increase or decrease them as you do certain actions, and if they aren’t equal at the end (water == land) then you’ve failed.


(Logan"Nogan" Carter) #3

OK Thanks that worked with i would of thought of that.


(Logan"Nogan" Carter) #4

wish i would thought of that