Random Number between 1 and 100
![thespis721](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Thanks for all the help I'm getting on this board. I think I have an easy question but I it's alluding me.
What's the formula for the game to pick a random number between 1 and 100?
Like I click a button and the game chooses a number between 1 and 100 at random?
Thanks again!
What's the formula for the game to pick a random number between 1 and 100?
Like I click a button and the game chooses a number between 1 and 100 at random?
Thanks again!
Comments
random(min,max)
Replace the min with 1 and the max with 100:
random(1,100)
This will generate a random number between 1 and 100. This expression can be used wherever a number can be used. For example, you can have an actor rotate to a random angle using Rotate to Angle and using random(0,359) for the direction. Or you can create a game attribute and use Change Attribute within a timer to set it to a random number over and over.
- Jeff