[Thread Prev] [Thread Next]
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.
----- Original Message -----
From: "Zehava Wizman" <zehava_w@xxxxxxxxxxx>
Sent: Saturday, February 19, 2005 11:40 PM
Subject: [MWForum](no subject)
> 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
> touching? with If commands, so I entered 3 turtles (they are red and lie
> the red color, so they are not seen. When each horse is touching the
> the race must stop, and text ought to be shown on the screen with the
> of the winner, and time.
> Procedure "start_run, check each time whether there is touching (with
> 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!
Description: Binary data
Previous by thread:
Next by thread:
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.