Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

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

[Thread Prev] [Thread Next]

Subject: Help with Conditionals
From: mwforum@xxxxxxxxxxxxxxxxxx (Wendy Petti)
Date: Thu, 20 May 2004 02:04:20 -0400

After I sent my version of the river project, it dawned on me that the
project might be more fun if the user never knows ahead the time the speed
of the oranges and which orange will "win."  This is easy to do if you
replace the 5 separate setspeed commands with this one command:

ask [t1 t2 t3 t4 t5]
[setspeed (300 + random 200) / 1000 ]

and place that in the setup procedure.  (Feel free to modify the numbers as
you wish, of course.)

Then, to display the speed of each orange, modify the individualized check
procedures like this (using check1 as an example):

to check1
if touching? "t1 "t11 [text1, ct insert t1's "speed insert char 32 insert
"m/s showtext
t1, bk 1  clickoff]
end

To change the content of the textboxes, they must be opaque.  So I hid their
names to make the opaque textboxes less bulky.  (It is possible to make them
opaque while they are still invisible and then make them transparent again
before making them visible, but I don't think it's worth the trouble....)

I attach River_project2exp3 to demonstrate randomly-generated orange races.

Wendy Petti
OpenWorld Learning
http://www.openworldlearning.org
OWL's MicroWorlds in Action
http://mia.openworldlearning.org



Attachment: River_project2exp3.mw2
Description: Binary data


  • Previous by thread: Help with Conditionals
  • Next by thread: Help with Conditionals

  • 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