Skip to Main Content
Stencyl Essentials
book

Stencyl Essentials

by Richard Sneyd
April 2015
Beginner to intermediate content levelBeginner to intermediate
206 pages
3h 46m
English
Packt Publishing
Content preview from Stencyl Essentials

Programming the button

Great! Now that we have created and configured the Play Game Button, we must write an Actor Behavior that will cause it to behave like a button by reacting to the mouse's events. To do so, perform the following steps:

  1. Go to the Dashboard tab, select Actor Behaviors, and click on Create New.
  2. In the ensuing window, set Name to Play Button Handler, and click on Create.
  3. Navigate to Add Event | Input | On Actor, as shown in the following screenshot:
    Programming the button
  4. Switch the condition from enters to is pressed on, as shown in the following screenshot:
  5. In the blocks palette, navigate to Scene | Game Flow | Transitions, drag out and add a switch to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick
Native Mobile Development

Native Mobile Development

Shaun Lewis, Mike Dunn

Publisher Resources

ISBN: 9781784399450Purchase Link