# Emotion Blocks

Emotion blocks make your Codey Rocky more human-like. It can smile, get naughty, or even turn to you for care. Isn't it marvelous?

## Add Emotion Blocks

### 1. Make sure "Codey" is selected and click "+" in the blocks area.

![](http://docs.makeblock.com/codeyrocky/en/tutorials/emotion-blocks-1.png)

### 2. From the pop-up Extension Center page, click "+" to add emotion blocks.

![](http://docs.makeblock.com/codeyrocky/en/tutorials/emotion-blocks-2.png)

### 3. Go back to Edit page. You can find emotion category added to the block palette.

![](http://docs.makeblock.com/codeyrocky/en/tutorials/emotion-blocks-3.png)

## Have Some Fun

Let's try out the emotion blocks. We'll make a fun game. Codey Rocky bumps into a cave full of gold coins and starts collecting them.

Before coding, you need to hang up the chocolate coins, and the toy pan.

<div align="center"><img src="https://2169521322-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpB_n-ftH_l6rtTiAfI%2F-LyWOqBr6f5SOWXvZ1KK%2F-LyWTxx1RSN_PGPup4-x%2Fcodey.gif?alt=media&#x26;token=94073162-18a4-40fa-b02f-6ba563bfa3f6" alt=""></div>

### 1. Drag a when Codey starts up block from the Events category to the scripts area. Add an Action block move forward at power ()% for () secs, with 100% power for 0.5 second.

![](http://docs.makeblock.com/codeyrocky/en/tutorials/emotion-blocks-4.png)

![](http://docs.makeblock.com/codeyrocky/en/tutorials/emotion-blocks-5.png)

### 2. Add four Emotion blocks: look around, wow, look left, and look right.

![](http://docs.makeblock.com/codeyrocky/en/tutorials/emotion-blocks-6.png)

### 3. Add another Action block move forward at power ()% for () secs, with 100% power for 0.5 second.

![](http://docs.makeblock.com/codeyrocky/en/tutorials/emotion-blocks-7.png)

### 4. Add a Control block repeat (), and input number 4. Then add an Emotion block yes and an action block move forward at power ()% for () secs, with 100% power for 0.2 second.

![](http://docs.makeblock.com/codeyrocky/en/tutorials/emotion-blocks-8.png)

![](http://docs.makeblock.com/codeyrocky/en/tutorials/emotion-blocks-9.png)

![](http://docs.makeblock.com/codeyrocky/en/tutorials/emotion-blocks-10.png)

### 5. Drag two more Emotion blocks: proud and smile.

![](http://docs.makeblock.com/codeyrocky/en/tutorials/emotion-blocks-11.png)

### 6. Add another Action block move forward at power ()% for () secs, with 100% power for 0.6 second.

![](http://docs.makeblock.com/codeyrocky/en/tutorials/emotion-blocks-12.png)

### 7. Last, add three more Emotion blocks: startle, dizzy, and hurt.

![](http://docs.makeblock.com/codeyrocky/en/tutorials/emotion-blocks-13.png)

### 8. Click "Upload" to upload the program to Codey.

![](http://docs.makeblock.com/codeyrocky/en/tutorials/2018-12-05-09-51-28.png)

### 9. Check how Codey Rocky collect gold coins!

{% file src="<https://2169521322-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpB_n-ftH_l6rtTiAfI%2F-LyWOqBr6f5SOWXvZ1KK%2F-LyWUhTb5XauIdhnVKQ2%2Fcollect-coins.zip?alt=media&token=def22a7e-a297-4eb2-95d0-b5f8aa895a76>" %}
Download the code here.
{% endfile %}
