The game file to import and load for this session is 5961_02_06.stencyl
.
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.
We needed to find a behavior that would allow us to control the monkey with the keyboard, so we first selected the tab for the monkey actor, and then we chose the Jump and Run Movement behavior, so it is now attached to the monkey actor.
The instructions in the newly-attached behavior will now apply to the monkey actor but, before we test our game, we need to provide the behavior with some information, so that it knows exactly what to do.
Some behaviors must be provided with information so that they can do their job but, at the moment, the Jump and Run Movement behavior doesn't have all the information that it needs.
The configuration information that we supply to a behavior are called attributes, and an attribute could be almost any type of data such as a number, text, a type of actor, or even a list of items.
As we can see, if we scroll down the configuration information for the Jump and Run Movement behavior that we have onscreen, there are quite a lot of attributes needed to configure this behavior!
Fortunately, the Jump and Run Movement behavior only needs us to provide the following attributes to get started:
Our next task is to specify these attributes so that we can move the monkey with the keyboard and see the correct animations as the monkey moves around the scene.
3.129.21.47