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!

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!

I don't really use Alice 3, so I'm not sure how much help I can be, but...
What I tried was that I used "each in _ together" and put every gopher in an array for it. I made it so that in the "each in" thing, the gopher would delay a random number of seconds and then move up and down.
Again, there's probably a better way to do this, but I gave it a shot.

"Remember: if you don't like what you see, you can change it!"
-The Infomaniac

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.

Select performCustomSetup

At the bottom of the performCustomSetup window drag a variable into the window.

In the insert variable pop-up that appears:

Select the variable radio button.

Set value type: to gopher (in gallery class.)

Check the is Array box

Give the array a sensible name (like gophers)

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.

Navigating the interface in Alice3 takes a while to get comfortable with. The attached example is very basic, would require extra work to make the game, but demonstrates random selection.

Hi Mr Moke,
Attached is your example with two changes. I used a timer event and changed the random number routine to use the length of the mole list ( the original code never moved the last mole.)
The timer avoids the infinite loop problem making it easier to add other methods etc without having to do it all within the loop.