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:
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:
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:
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 Pane: In this...