Time for action – attaching a behavior to an actor
The game file to import and load for this session is 5961_02_06.stencyl
.
Note
We will be working with the monkey actor, so ensure that it is currently on display in the Animation Editor.
Stencyl comes packaged with many useful behaviors—and we first need to tell Stencyl to attach the required behaviors to the relevant objects within our game. In this case, we need to attach a behavior to the monkey actor, so that we can control it with the keyboard.
Click on the Stencyl Book Monkey tab to display the monkey in the Animation Editor.
Click on the Behaviors button in the row of buttons at the upper-center of the screen.
Click on the message Click here to choose a Behavior to attach to this Actor Type that appears in the main panel.
In the left-hand side panel of the Choose a Behavior dialog box, click on the Controls option that appears under the FROM YOUR LIBRARY heading.
Scroll down the list of behaviors that appears, until you can see the thumbnail...