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: (no subject)
From: mwforum@xxxxxxxxxxxxxxxxxx (Jeff Knope)
Date: Sun, 20 Feb 2005 08:58:13 -0800

Hi Zehava,

I also don't understand why WINNER is not run following the clickoff.  But I
did find a way to make the touching? method work that does allow WINNER to run.

I placed forever [CHECK] in START_RACE and wrote the if statements in CHECK in
the form: if touching? "t1 "t4 [winner "horse_1 cancel [check]]

Some other things you might want to fiddle with:

Try taking the wait out of WINNER, because the textbox will stay there until
the announcement is clicked "okay".

Try using all four horse shapes found in the shape file, placing a shorter
wait between each one, and making a 1/4 :steps move with each setsh, resulting
in a more realistic running horse.

Try making it a closer horserace by making the input to START_RUN 40 + random
15, or somesuch, instead of random 70.  With the values of this example, all
the horses have :steps of at least 40, but less than 55.

Instead of 3 different red turtles hidden in the red rectangle, try using just
one and give it the shape of the red rectangle.  So now, the touching? test
checks each horse with just the one "t4 turtle.

Try putting the RESTART at the end of WINNER, so the game is automatically
reset after clicking the "okay" in the announcement, making one less button.

I notice very rarely it selects the wrong winner.  This is because the CHECK
procedure is running parallel to the horses moving, and sometimes the first
touching? it finds "true is not the fastest horse.  This could be overcome by
testing which horse has the highest :steps value, and declaring it the winner
(which it should be).  This idea is not implemented in the attached project.

Have fun,
Jeff


----- Original Message ----- 
From: "Zehava Wizman" <zehava_w@xxxxxxxxxxx>
To: <MWForum@xxxxxxxxxxxxxxxxxx>
Sent: Saturday, February 19, 2005 11:40 PM
Subject: [MWForum](no subject)


> hi!
> 1. here attached project dealing with horses race, I programmed it with 2 
> ways,one - with edit color, and it's working, and the second, I want to
use 
> touching? with If commands, so I entered 3 turtles (they are red and lie
on 
> the red color, so they are not seen. When each horse is touching the
turtle, 
> the  race must stop, and text ought to be shown on the screen with the
name 
> of the winner, and time.
> Procedure "start_run, check each time whether there is touching (with
"check 
> procedure), if yes, it has to  activate "winner.
> What I see : Its identify the touching,  but doesn't activate winner , My 
> question is WHY???
> 2. I tried before using Clickon/Clickoff  to use it with edit color when 
> it's meet the color, I wrote stopall winner, and it's also doesn't do 
> anything after stopall, only when I used Clickon/Clickoff with edit color
, 
> it's worked .
> 
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE! 
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>

Attachment: horses2.mw2
Description: Binary data


  • Previous by thread: (no subject)
  • Next by thread: (no subject)

  • 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