हिंदी

Script Formation and Instruction Blocks

Advertisements

Topics

CBSE: Class 9

Script Formation and Instruction Blocks

What is a script? 
After adding sprites, costumes, and sounds, our next step is to build an animated story using these sprites, their costumes, and sound effects. This process involves giving instructions in a logical sequence, and the set of instructions for each sprite is called a script.

Features of Script Sprites :

1. The script will contain instructions for each and every action for that particular sprite.

2. These actions may include movement, sound, change of costume, etc.,

3. Each instruction is dragged from the Scripts tab to the script area.

4. Users can drag as many instructions as they want and add them to the script stack in the script area on the right side of the Scratch window.

5. Instructions are executed in the exact order they are stacked in the script area. Some of the commonly used instructions are listed below along with their explanations.

Category Instructions Explanation
Motion Move <n> steps
Turn   <n> degrees
Glide <n1> secs to x:<xn> y:<yn>
Move the sprite by n number of steps
Turn right by n degrees.
Move while gliding in n1 seconds to xn and yn coordinates.
Looks Hide
Show
Say <text>
Say <text> for <n> secs
Switch costume to <cst>
Hide the sprite.
Show the sprite.
Display text in a speech bubble.
Display text in a speech bubble for n seconds.
Change the sprite’s costume to any of the added ones (cst).
Sound Play sound <audio>
Play sound <audio> until done
Stop all sounds
Play audio and move to the next instruction block.
Play audio till it completes, then move to the next block.
Stop all playing sounds.
Events When    clicked Run the script when the green flag is clicked.
Control Wait <n> secs Wait for n seconds, then proceed to the next block of Instructions.

Forming a script :

Step 1: Select the starfish sprite.

Step 2: Click the Scripts tab; the script area will be blank.

Step 3: Click the Events button under the Scripts tab. Drag When   clicked to the script area.  

Step 4: Click Sound and drag Play sound water drop.

Step 5: Drag other instructions in order to: Play sound, Move sprite, Hide/show sprite, Wait and Show speech bubble. 

Step 6: Start Playing the animation.

Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×