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!
We've attached a second behavior to the monkey actor, and this additional behavior is designed to prevent the actor from leaving the scene. Hopefully, we could see that the behavior did its job when we tested the game!
Unlike the Jump and Run Movement behavior, which had some information that needed to be configured, the Cannot Exit Scene behavior does not have any attributes that can be changed, so we were able to jump straight into testing the game, as soon as the behavior had been attached to the actor.
Currently, our monkey only has a very small area in which to play, as he is restricted to moving within the confines of our game window which is quite small—640 pixels wide and 480 pixels high. This is a common screen size for Flash games, which is why it is the default size for Stencyl games.
It might be possible to create an interesting jungle scene in such a small space but, we can make the game more interesting for our players, if we make the gameplay area much wider, so let's change the settings for the Jungle scene to make it three times as wide.
3.21.104.183