Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Stencyl Essentials

You're reading from   Stencyl Essentials Build beautiful, unique, cross-platform games rapidly with the free Stencyl 2D game engine and toolset

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher
ISBN-13 9781784399450
Length 206 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Richard Sneyd Richard Sneyd
Author Profile Icon Richard Sneyd
Richard Sneyd
Arrow right icon
View More author details
Toc

The player handler

The first behavior that we are going to create is the Player Handler. This behavior will be attached to the Player Character (PC) that exists in the form of the Cowboy Actor Type. This behavior will be used to handle much of the game logic and will process the lion's share of the player input.

Creating a new actor behavior

It's time to create our very first behavior! Go to the Dashboard, under the LOGIC heading, select Actor Behaviors, as shown in the following screenshot:

Creating a new actor behavior

Click on This game contains no Logic. Click here to create one. to add your first behavior. You should see the Create New... window appear:

Creating a new actor behavior

Enter the Name as Player Handler, as shown in the previous screenshot, then click on Create. You will be taken to the behavior designer window, as shown in the following screenshot:

Creating a new actor behavior

Let's take a moment to examine the various areas within the behavior designer window. From left to right, as shown in the preceding screenshot, we have the following:

  • Events...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image