Alice Community  

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

Reply
 
Thread Tools Display Modes
need help
Old
modifiedbears
Guest
 
Status:
Posts: n/a
Default need help - 12-01-2006, 12:20 AM

I have a list of objects. I want an object randomly chosen by alice from the list to perform a function, wait 1 second, then perform another function on the object randomly chosen. How do I do this?
   
Reply With Quote
Old
modifiedbears
Guest
 
Status:
Posts: n/a
Default 12-01-2006, 02:12 AM

*I meant method instead of function. Sorry, it's late.
   
Reply With Quote
Old
modifiedbears
Guest
 
Status:
Posts: n/a
Default 12-01-2006, 04:29 PM

is this just not possible? am i missing something?
   
Reply With Quote
Old
gabe
Administrator
 
gabe's Avatar
 
Status: Offline
Posts: 461
Join Date: Jul 2005
Location: Pittsburgh, PA
Default 12-01-2006, 04:42 PM

If I create a variable (world's details > create new variable) that is a list of objects, I can then make Alice perform an action on a randomly chosen object within that list.

For example, if I want a random object to turn left 1 revolution, drag an object into a method and select <object> turn left 1 revolution. Note that it doesn't matter which object is used -- it is merely a placeholder which you will then drag the variable onto. After dragging said variable onto the placeholder, select "random item from list" from the drop-down menu.
   
Reply With Quote
Old
modifiedbears
Guest
 
Status:
Posts: n/a
Default 12-01-2006, 09:15 PM

Quote:
Originally Posted by gabe View Post
If I create a variable (world's details > create new variable) that is a list of objects, I can then make Alice perform an action on a randomly chosen object within that list.

For example, if I want a random object to turn left 1 revolution, drag an object into a method and select <object> turn left 1 revolution. Note that it doesn't matter which object is used -- it is merely a placeholder which you will then drag the variable onto. After dragging said variable onto the placeholder, select "random item from list" from the drop-down menu.
yea i can do that

the next step is getting alice to recognize which object it randomly chose to then have it perform another method with.
   
Reply With Quote
Old
modifiedbears
Guest
 
Status:
Posts: n/a
Default 12-02-2006, 01:12 AM

I have an assignment due wednesday, and I could use some more help with this. The instructor doesn't know how to progam with Alice anymore than the class does. The book (written by Charles W. Herbert) we are using isn't much help either. We've been doing a lot of really basic stuff then he tells us we have to make a game using Alice.
   
Reply With Quote
hi
Old
drin
Guest
 
Status:
Posts: n/a
Smile hi - 12-15-2009, 02:25 AM

hello im a new alice user and im making a simple iq test game, and made a list a collection of question and another one with the answer. i made randomize qustion and i cannot test if the value from the list of questions is equal to the list from the list answer. hope you can help me thank youhttp://www.alice.org/community/images/icons/icon7.gif
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 12-15-2009, 05:31 PM

Can you post your world so I can see what you tried?


(')>
   
Reply With Quote
Reply

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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.