Time for action – configuring the behavior

The game file to import and load for this session is 5961_02_07.stencyl.

Ensure that we can see the attributes for the Run and Jump Movement behavior by opening the monkey actor and clicking on the Behaviors button at the upper-center of the screen.

Let's get the keyboard and animation information into the behavior:

  1. Click on the drop-down arrow next to the heading Left Control and select the item labeled left.
  2. Click on the drop-down arrow next to the heading Right Control and select the item labeled right.
  3. Click on the drop-down arrow next to the heading Jump Control and select the item labeled up.
  4. Scroll down the configuration screen so that the section with the red warning triangle icons can be seen.
  5. Click on the Choose Animation… button next to the first icon, which is labeled Idle Left Animation.
  6. In the Choose Animation dialog box that appears, click on the thumbnail for the monkey's Idle Left animation.
  7. Click on OK to confirm your choice.
  8. Click on the Choose Animation… button next to the second icon, which is labeled Idle Right Animation.
  9. In the Choose Animation… dialog box that appears, click on the monkey thumbnail image labeled Idle Right.
  10. Click on OK to confirm your choice.

What just happened?

We have selected the keys that we are going to use to control the monkey—arrow left, arrow right, and arrow up—and we have specified which animations are going to be displayed when the monkey actor is idle facing left or idle facing right.

However, we haven't quite finished configuring the Jump and Run Movement behavior yet—we need to specify the last few animations, and that's our next task.

Have a go hero – configuring the remaining animations

We have already configured the first two animations, so go ahead and configure the final four:

  • Run left
  • Run right
  • Jump left
  • Jump right

Just click on the Choose Animation… buttons and select the appropriate animation from the dialog box.

If we make a mistake when choosing the animations, it doesn't matter! We can simply click on the Choose Animation… button again, and select the appropriate animation.

Save the game!

Always save the game after changes have been made!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.186.92