This lesson introduces the concept of a variable by discussing X, Y, and Heading. Students will explore the coordinate grid and learn how to move sketches by changing the X and Y, both directly and in scripts. The slider and joystick will be used to change X, Y, and Heading. The lesson's activity will be to make many sketches move around the screen with sliders and the joystick.
SCREENCAST - (en) (ht) (es) (pt) (fr) (de) (ja)
|Unable to render embedded object: File (basic-etoys-07-front.png) not found.||Unable to render embedded object: File (basic-etoys-07-back.png) not found.|
- Objects are located in the X/Y coordinate grid.
- X goes from the left side to the right side, getting bigger to the right.
- Y goes from the bottom to the top, getting bigger as it goes up.
- The largest coordinate for X is 1200. The largest for Y is 900.
- Set a variable in your script by dragging the variable tile by its white arrow.
- Make a reset script by first moving the object where you want it.
- Drag the X, Y, and Heading variables to make the reset script, then make a button.
- The slider object lets you drag its thumb to make numeric value bigger and smaller.
- Change the max value to 5 and the min value to -5.
- Use a variable by dragging the name. Change a variable by dragging the white arrow.
- Connect an object with the slider by dragging "numeric value" the tile and dropping it on a number in the script.
- To increase a variable, click the black left arrow and choose "increase by"
- Change an object's Y, by using "Y increase by Slider's number value".
- To use arithmetic, click the green right arrow and choose +, -, * (multiply), / (divide).
- Drag the all scripts panel from the supply box to start and stop all your scripts at once.
- The joystick object is like a slider in both directions.
- Use Joystick's up down to make the Y bigger and smaller.
- Use Joystick's left right to make the X bigger and smaller.
PROJECT - (multi)