Time for action – making the ground shake
The game file to import and load for this session is 5961_07_03.stencyl
.
Open the Manage Statues actor behavior and create a new When Creating event.
Rename the new event to
Initialize statue
.Add the instruction block to the new event, as shown in the following screenshot:
Create a new When Updating event and rename it to
Check if stopped
.Add the required instruction blocks, so the new event looks like the following screenshot:
Create a new When this actor collides with… Something Else event and rename it to
Shake screen on collision
.Modify the new collision event using the instruction blocks shown in the following screenshot:
Test the game; watch as the statues land on any object!
What just happened?
We have implemented the instructions to make the screen shake when a statue lands, either on a tile, such as the ground, or on an actor.
The instructions for this effect comprise of three separate parts. The first part required us to specify an actor value...