Extension—Pen

With the Pen extension, you can enable your sprite to paint words or patterns.

Add the Pen extension

1. Click the Sprites tab and click + extension at the bottom of the Blocks area.

1596678324368-09d85f7e-60ff-4c06-b35c-189b1765b5bc.png

2. On the Extension center page that appears, click + Add at the bottom of Pen.

image.png

After being added, the extension and its blocks are displayed in the Blocks area.

1596701545880-bc5edf92-58b5-44fd-9fea-c225139ff13d.png

Use the Pen blocks

Example: Use the Pen blocks to paint a heart

1. To paint a heart, you need to use the blocks set pen color to ( ), pen down, and pen up. You can drag all these three blocks to the Scripts area first.

1596701721715-e74c8378-9560-43f7-a6df-323647849a6f.png

2. Set the coordinates for pen down. In this script, let's set them to (0, 40).

1596701317447-d1d13df4-eb25-42a9-811d-cdfa61c7e7fa.png

3. Set the motion path of the sprite, enabling it to paint the pattern we want.

1596701849746-841fbdce-8cb2-4217-a880-9b727ec269c5.png

4. Set the sprite to move away after pen up to show the entire pattern.

1596701872484-9b10f2fa-7e45-403e-8c3d-baba379ccc0d.png

5. Click the green flag under the stage and then the sprite will paint a heart.

1596701285702-e6a99968-fc7f-492e-9400-0500a969d665.gif

Was this article helpful?
3 out of 5 found this helpful

Comments

0 comments

Please sign in to leave a comment.