Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Thread Tools Display Modes
Need help with Random Numbers
Posts: n/a
Default Need help with Random Numbers - 03-23-2010, 02:40 PM

Okay well I'm trying to make a 'game', if you want to call it that. You have 5 guesses to click on a roof of the 15 shacks, and if you find the chicken within the 5 guesses, than you win. But I'm having trouble with the Random Numbers portion.

I made a new function titled randomnumber and I have the opacity of the 15 chickens I have in the world set to 0%. I want to make it so that if the random number 1 through 15 shows up (each one correlating with the right chicken), that chicken's opacity will be set to 100%. The function is getting messed up by it's 'return' however, and whatever number is in the 'return' is the number of the chicken whose opacity gets filled in.

I'll attach the program if anyone needs it.
Attached Files
File Type: a2w chicken.a2w (10.07 MB, 4 views)

Last edited by oliminator123; 03-23-2010 at 02:51 PM.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2018, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.