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
About the Author
About the Reviewers

The dynamic cursor

One of the most important HUD elements in our game prototype is the dynamic cursor. Put simply, this is a special-purpose actor that we will create to replace the regular mouse cursor. It changes the animation, depending on the current movement state of the Player Character, hence the designation dynamic. To create the dynamic cursor, perform the following steps:

  1. Create a new Actor Type, and name it Dynamic Cursor.

  2. Select the Click here to add a frame button to import your first frame. Navigate to and select Game Assets\Graphics\GUI Elements\down.png.

  3. Change the Name of the animation to Down.

  4. Switch to the collisions context. Select the default collision box, and hit on Delete, as we will not need to calculate the collisions for this actor, as shown in the following screenshot:

  5. Duplicate the Down animation, as shown in the following screenshot:

  6. Change the new animation's name from Copy of Down to Left.

  7. Remove the redundant frame that is carried over from the Down animation, as...