View Full Version : Setting variable as random number

12-24-2015, 08:45 PM
Simple question:

I have declared a variable, and have given it a starting value of 1. Now I would like to, within a method, set the variable to a randomly generated number. Where do I find the function to do this??
I know it's staring me in the face and I just can't see it!

12-24-2015, 09:46 PM
I figured it out, but wanted to post how in case someone else was having this silly problem.

So my issue was I still had an object highlighted in the object tree. So, when I went to the function menu, all I had were functions of that particular object. When I switched to the World being selected, I then had the basic functions! I knew it had to be a simple problem and solution! :P

12-28-2015, 12:27 PM
Yeah, there is 2 sets of functions in Alice, the local functions which deal with a specific object, and the world functions which deal with everything that doesnt require an object to be used.