Project Folders
Teacher Resources
Student Resources
How Do I?
Site Map
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: zehava wizman <zehavawi1@xxxxxxxxx>
Subject: Re: (no subject)
From: Alain Tougas LCSI <alain@xxxxxxx>
Date: Sun, 02 Jan 2011 09:23:44 -0500


I didn't try it, but that should give you some clues:

Give real names to your turtles. They will be easier to manage. I gave them
names such as bag, shoe, dress, pants, gown.

Create a new page. I called it theotherpage.

Create a third page where you will put your text box. The name of the page is
not important but the name of the text box must be UNIQUE in the project. In
my example, the text box is named BAGLIST.

Go back to page 1 (where you do the shopping)

Remove your "when this" instructions in the bag. If you use this approach, you
have to CANCEL these instructions otherwise they will run forever.

In the bag's rules tab, write CHECK in the TOUCHING field.

Create the procedure WHOISIN on that turtle's PROCEDURES tab.

to whoisin
if touching? "bag "shoe] [shoe, ht, baglist, pr "shoe]
if touching? "bag "dress] [dress, ht, baglist, pr "dress]
if touching? "bag "pants] [pants, ht, baglist, pr "pants]
if touching? "bag "gown] [gown, ht, baglist, pr "gown]

In the ONCLICK field of the bag, type BAGCLICKED.

Create that procedure in the BAG's PROCEDURES tab.

to bagclicked
recreateitems textcount "baglist

Now each time you drag a shoe on the bag, the procedure CHECK is executed, it
runs and it writes the word SHOE in the text box on Page3.

Create the following procedure in the PUBLIC PROCEDURES tab:

to recreateitems :counter
if :counter = 0 [stop]
clone textitem :counter "baglist 
recreateitems :counter - 1

Now if you click on the bag in Page1, you will be directed to THEOTHERPAGE and
the procedure RECREATEITEMS will be executed. It takes as input the number of
lines you have in the text box. For each line, it clones that turtle on the
current page (THEOTHERPAGE) until all the lines of the text box are done
(counter = 0).

God luck,

Alain Tougas

Le 2011-01-02 à 04:13, zehava wizman a écrit :

> Hello forum!
> I will describe the problem:
> there are some turtles, the player decides which turtle he wants to enter
> the basket (when the tutle touches the basket,those turtles get ht
> instruction(I did it with WHEN THIS     DO THAT in the backpack of the
> basket). Now I want the program will identify those specific turtles the
> player selects, and when I will click on the basket, a new page will be opened
> and only those turtle (with their shaped) will be displayed.
> I want to do it without variables (maybe with textbox). If it possible? Here
> attached an example
> thanks, Zehava
> <identify.mwx>_______________________________________________
> MWForum mailing list
> MWForum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> http://mia.openworldlearning.org/mwforum.htm

  • Previous by thread: (no subject)
  • Next by thread: Re: bags and cloths

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.

    © copyright 2001 - 2008