# 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="/files/-LyWTxx1RSN_PGPup4-x" 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="/files/-LyWUhTb5XauIdhnVKQ2" %}
Download the code here.
{% endfile %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.pakronics.com.au/primary/codey-rocky-ai-robot/tutorials/emotion-blocks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
