PDA

View Full Version : Setting variable as random number


kaufill
12-24-2015, 07: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!

kaufill
12-24-2015, 08: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

RavenOfCode
12-28-2015, 11:27 AM
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.