This content has been marked as final. Show 3 replies
can you be a bit more specific as to what you want to do?
you want the user to input a random percentage? or you want the user to input a number which you convert to a percentage? I'm unclear of what you want.
if I understand correctly:
make a variable a random number.
say you want one condition to happen 25 percent of the time, another 30% and another the rest, you could say
if(randomNum <= .25) do this; if(randomNum > .25 && randomNum <= .55) do this; else do this;
Where does the mood come from? Is it something that is random? Is it given by the user? Is it calculated from somewhere? It's a bit hard to know how to help you without know that...