Page 78 - PlugGPT_V2.0_C4_Flipbook
P. 78
Some of the common categories of blocks are: Motion, Looks, Sound, Pen, Data,
Events, Control, Sensing, and Operators.
Block Use
category
These blocks are used to place your sprites on the stage or move
Motion
them.
Looks These blocks control what your sprites and backdrop look like.
Sound These blocks are used to play or stop sounds.
These blocks are used to draw shapes and patterns on the stage,
Pen
change the pen color and size.
These blocks control the blocks within your scripts, inserting
Control
conditional statements, loops, repeats and pauses.
These blocks identify what's happening at a given point and make
Sensing
your sprites or background respond to user actions.
These blocks let you make comparisons between or perform
Operators
arithmetic functions on different values.
CREATING A SCRIPT
A script is another name for a program. Let’s create some scripts.
Example 1: Talking and jumping Sprite
Step 1 Drag the when clicked block from Events block menu. This block will
activate once the green flag is clicked.
0
Step 2 Drag the go to x: y: 0 block from Motion blocks menu to set the initial
position of the Sprite.
forever
Step 3 Drag the block from Control blocks menu. All blocks inside
the Forever block run until the Stop button is clicked.
Step 4 Now, drag and place the blocks inside the Forever block as shown. Change
the values respectively.
• next costume will change the Sprite’s costume to the next.
76 Premium Edition-IV

