Chapter 7. Complex Behaviors and Code

In this chapter, we'll build on the basic knowledge and competency that we acquired in Chapter 6, Writing Simple Behaviors with the Stencyl visual programming system. Going beyond the basic events and blocks, we'll learn how to:

  • Create custom blocks and events
  • Handle advanced conditional logic scenarios
  • Communicate between the scene and actor behaviors using a series of special-purpose blocks built into Stencyl's proprietary visual programming language

Adding player interaction

Before there can be any ostensible gameplay, we must accept and react to some form of player input. This gives the player some level of agency within the game. Let's learn how to do this now.

Initializing the variables

The very first thing ...

Get Stencyl Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.