AW: Morphic viewers and SyntaxMorph

Bob Arning arning at
Thu Aug 26 13:44:58 UTC 1999

On Thu, 26 Aug 1999 13:54:48 +0200 Torsten.Bergmann at wrote:
>I also watched the Educomm presentation by Alan. Cool !
>Is someone able to shortly describe the things he did to
>combine the wheel with the car without coding. The video quality
>was poor - so I wasnt able to figure out how he did it.


Assuming you have created the car and the wheel (and that they have been named "car" and "wheel" in their respective viewers):

1. From the viewer for the car, drag the "car turn by..." tile from the basic section of the viewer onto the desktop. This creates a new script for the car.

2. From the viewer for the wheel, drag the "wheel heading..." tile and drop it onto the rightmost part of the "car turn by..." phrase in the script created in step 1. This part probably has up and down arrows, the number 5 and a right arrow. This is the "argument" to the turn command if you will. The phrase should now read: "car turn by wheel's heading" followed by a right arrow.

3. In the top of the script, change the status from "normal" to "ticking". This makes the script run continuously.

4. Now you can turn the car using the wheel. Bring up the halos for the wheel (cmd-click or whatever your platform uses). Grab the blue dot in the lower left and rotate the wheel. The car should turn as you rotate.

5. You will probably find the turning a bit sensitive, so scale it down:

6. In the script, click the right arrow at the end of the phrase created in step 2. This will add two additional tiles: an arithmetic operator and a number. Cycle the operator to "/" and the number to 5. This will reduce the sensitivity of the steering.

7. To make the car really drive, you need some forward motion. From the car viewer, drag the "car forward by" tile onto the script (either before or after the turn phrase already there). Now you can motor around the screen.


More information about the Squeak-dev mailing list