Time for action – attaching another behavior to the actor
The game file to import and load for this session is 5961_02_09.stencyl
.
We can easily prevent actors from leaving a scene by attaching another behavior, so our next task is to do just that!
Ensure that the Stencyl Book Monkey tab is active.
If the Stencyl Book Monkey tab isn't currently open, go to the Dashboard, click on Actor Types under the RESOURCES heading, and double-click on the thumbnail image for the monkey.
Click on the Behaviors button at the upper-center of the screen.
Click on the + Add Behavior button at the very lower-left corner of the screen.
In the left-hand side panel of the Choose a Behavior dialog box, click on the Motion option that appears under the FROM YOUR LIBRARY heading.
Find the Cannot Exit Scene behavior in the main panel, and double-click it. Be careful not to select the similarly named Cannot Exit Screen behavior—it doesn't do exactly what we need!
Read the information on the behavior screen that is now being...