How to make a custom cursor in Stencyl? – In simple steps

The following block shows a simple method for making your own custom cursor in Stencyl.  Please refer to the Stencyl community help section for further details on coding blocks.

Stencyl Logo - Copyright Stencyl
Big Stencyl logo

Getting started with your custom Stencyl cursor

This ‘how to’ covers some basics for making a custom cursor in Stencyl. In a nutshell, you need to hide the default operating system cursor and swap out for your own custom cursor, which will be an actor type.

Cursor

Part 1 : Graphics

A ) Firstly you will need to draw your one custom cursor in graphics program of your choice. I used Adobe Illustrator to draft up this pointer and exported it as a .PNG – Dims 29px 27 px, remember to save your .PNG in logical place in your project folder.

Part 2 : Importing a Cursor As An Actor Type

a ) Open Stencyl and navigate to your game project (assuming you have already made a project)

b ) In the upper left corner press on the “Actor types”and create a new actor. You will then need to add a frame and import your newly created cursor!

Actor from stencyl
Example

Part 3 : How To Make it work

a ) Click on ‘actor behaviours’ and create a new behaviour! This will be a basic behaviour to make your Cursor work in your game.

b ) Click “add event” in the top of the panel. Add > When updating

c )You can either navigate through the code blocks manually or you can search for them. Using the image shown.

Stencyl code block
Stencyl Custom Cursor Code Block

That’s how to make a basic Cursor in Stencyl!

Don’t forget to attach the block to the Cursor Actor, the green button in the top right will allow you to do this – “Attach to actor”

Run game!

Bug with cursor full screen * untick fullscreen mode!
Bug!

Please take into account that the flash player from Stencyl ( when tested from the game ) game glitches in full screen mode. The main default operating system mouse will still be visible despite having the cursor hidden.

This could be an apparent issue with the flash player. – Dated from May 2016.

Try unticking the full screen mode… Not the best

Notes : this bug happens on a iMac OSX i5 10.9.5

This post is edited originally from here > personal blog.

If you are looking to download stencyl you can download the software here.

If you need assistance with some of you game design assets have a look at the design portfolio here

You may also be interested in reading how to make a board game