View Single Post
Alice 3 Guess
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default Alice 3 Guess - 02-22-2018, 02:43 PM

Quote:
Originally Posted by pyrogirl8 View Post
I'm trying to make a Whack a Mole Game for Alice 3, and I have made a list of gophers (there were no moles) but my issue now is I can't get that list of gophers into something I can use. By that I mean in the drop down box where you can select objects, there's "this", "thisWackaMole", "thisGround" and "thisGopher" 0-11, but I don't have a "thisGophers" that I can use to do like "thisGophers" move UP. I need them all to move at random as well, which I need help with. I don't know how to get it to select a random Gopher.
Thanks!
Like many of us in the Alice forum, I am not familiar with Alice 3 so take this with a dram of disbelief.
  1. Select performCustomSetup
  2. At the bottom of the performCustomSetup window drag a variable into the window.
  3. In the insert variable pop-up that appears:
  1. Select the variable radio button.
  2. Set value type: to gopher (in gallery class.)
  3. Check the is Array box
  4. Give the array a sensible name (like gophers)
  5. Click the initializer and add all your gophers to the array (one at a time.)
You should now have an array of gophers that you can select using the other actions in the performCustomSetup window and be able to program the game much like the example in the Alice 2 Programming book.

Mark


Mark Henwood
mhenwood@ieee.org

Last edited by chickentree; 02-22-2018 at 02:45 PM. Reason: Clearity
   
Reply With Quote