Time for action – adding gravity to the Jungle scene
The game file to import and load for this session is 5961_02_08.stencyl
.
Gravity in a game enables actors to fall or float, depending on the configuration that we specify, and we need the gravity in our game to allow the monkey actor to fall—just as it would in a real jungle—so let's make that change to the Jungle scene:
If the Jungle tab isn't visible at the top of the screen, we'll need to open up the Jungle scene first.
Click on the Dashboard tab.
Click on Scenes under the RESOURCES heading in the left-hand side panel.
Double-click on the thumbnail image for the Jungle scene.
Now that we can see the Jungle scene, we can change the required setting:
Click on the Physics button in the row of buttons in the upper-center of the screen, as shown in the following screenshot:
Change the contents of the text box next to the label Gravity (Vertical) so that it contains the number
85
as shown in the following screenshot:Click on the Test Game icon...