Time for action – creating an accelerometer-controlled game
A game file is not required for this session!
Create a new blank game called
AccelloSoccer
.Create a blank scene called
Soccer Pitch
, leaving all other scene settings at their default configurations.Download the actor called
Stencyl Book Soccer Ball
from StencylForge.Add the Stencyl Book Soccer Ball actor into the Soccer Pitch scene (so we don't forget to do it later).
Attach the built-in Bounce off screen bounds behavior to the Stencyl Book Soccer Ball actor.
Create a new actor behavior called
Ball Movement
, and attach it to the Stencyl Book Soccer Ball actor.Return to the newly created Ball Movement behavior, select + Add Event | Basics | When Updating, and rename the new Updating event to
Move Ball
.Add the instructions, shown in the following screenshot, to the new Move Ball event, noting that the accelerator's x multiplier is -100 (negative 100):
Ensure the target device drop-down list is set to the correct mobile device, and the...