Book Image

Stencyl Essentials

By : Richard Sneyd
Book Image

Stencyl Essentials

By: Richard Sneyd

Overview of this book

Table of Contents (20 chapters)
Stencyl Essentials
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Index

Collecting coins


Before we can begin with programming the coin collection gameplay, we need an actor in our game that will represent the coins. Let's create one now, using the now familiar Actor Type creation workflow that we established in the earlier chapters, by performing the following steps:

  1. In the Dashboard tab, under RESOURCES, select Actor Types, and click on Create New.

  2. Set the Name to Coin, and click on Create.

  3. Click on This Actor Type contains no animations. Click here to add an animation.

  4. Change the Name of the animation from Animation 0 to Default.

  5. Ensure that Looping? is checked. It should be checked by default.

  6. Click on the Click here to add a frame button.

  7. Set Scale to 4x, and Resize Method to Bicubic if these are not already set by default.

  8. Set Columns to 6.

  9. Click on Choose Image..., then navigate to and select Game Assets/Graphics/Actor Animations/gold coin anim.png.

  10. Click on Add to import this 6-frame sprite-sheet into our Default animation.