Create+a+Controllable+Agent

In this lesson, we will

 * Create your agent
 * Assign keys to control you agent

Create a Controllable Agent
 * 1) Select a breed to be your agent.
 * 2) Setup the Spaceland Environment
 * 3) Under Factory
 * 4) Select [ __Setup and Run__  Drawer](Color-Dark Red)
 * 5) Choose [ __Setup]__  and drag to Setup Window
 * 6) Select [ __Setup and Run__  Drawer] again.
 * 7) Choose [ __Clear All]__  block and connect it to the [ __Setup]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> block in the Setup Window.
 * 8) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Adding your agent to Space Land
 * 9) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Under [My Blocks] (Click the arrow to the right of Factory section).
 * 10) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Select Your Agent (It’s name will be showing that you have chosen).
 * 11) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Select [ __Create <Agent Name>]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> and drag to connect it under [ __Clear Everyone]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> in the Setup Window.
 * 12) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Set the number of your agent to 1.
 * 13) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">If you erase the [ __Number]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> block go to Factory (Click the arrow left of My Blocks).
 * 14) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Open the [ __Number__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> Drawer] (Color-Dark Blue).
 * 15) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Drag a __1__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">block to the [ __Create <Agent Name>]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> in the Setup Window.
 * 16) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Controlling Your Agent
 * 17) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Select [ __Setup and Run__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> Drawer] (Color-Dark Red) in the Factory section.
 * 18) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Choose the [ __Forever]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> block and place it in the [Runtime Window].
 * 19) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Open the [ __Logic__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> drawer ](Color-Orange) and drag out 4 [ __If Test Then]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> blocks.
 * 20) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Connect them one under the other to the [ __Forever]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Block.
 * 21) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">You will be setting up controls so that If a button is pressed, Then an action by the agent will be done.
 * 22) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Choose the [ __Controls__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> Drawer](Color-Yellow).
 * 23) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Drag a [ __Keyboard A?]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> and connect to each Test part of the [ __If Test Then]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> blocks.
 * 24) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">To the right of each [ __Keyboard A?]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> block is a downward triangle that appears when the mouse is on it.
 * 25) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Select the correct keyboard button for each Keyboard:
 * 26) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Up Arrow
 * 27) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Down Arrow
 * 28) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Left Arrow
 * 29) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Right Arrow
 * 30) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Moving the Agent
 * 31) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Choose the Movement Drawer (Color-Red).
 * 32) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Select [ __Forward Steps]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> and place it under the [ __If Test Then]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> block for Up Arrow.
 * 33) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Select [ __Back Steps]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> and place it under the [ __If Test Then]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> block for Down Arrow.
 * 34) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Select [ __Left Degrees]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> and place it under the [ __If Test Then]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> block for Left Arrow.
 * 35) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Change the degree number from 90 to 5.
 * 36) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 10pt; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Select [ __Right Degrees]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;"> and place it under the [ __If Test Then]__ <span style="background-color: transparent; font-size: 12pt; text-decoration: none; vertical-align: baseline;">block for Right Arrow.
 * 37) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Change the degree number from 90 to 5.
 * 38) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Go to the Space Land window and select the [Runtime tab] to see the [Setup] button and [Forever button].
 * 39) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Push the [Setup Button] to create you agent on a blank field.
 * 40) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Push the [Forever Button] so the controls (arrows buttons) will work.
 * 41) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">See if you agent is controlled by you.
 * 42) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Use different views [(Aerial, Agent Eye, and Agent View)] to observe your agent.
 * 43) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Extra
 * 44) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">If the Agent works and time is available,
 * 45) <span style="background-color: transparent; font-family: 'Times New Roman'; font-size: 12pt; text-decoration: none; vertical-align: baseline;">Edit the terrain to see how the agent acts on it. (Make mountains, blocks, holes, and color them to see more clearly.
 * 46) Observe the way your agent interacts now on the terrain.