Time for action — adding attributes to our objects
We are now going to give each of our objects the Solid attribute so that they can collide with each other. We will also give the player the Center view on me attribute so that the screen scrolls with the player.
1. Click on the player sprite and expand the Groups menu. Then expand the Attributes submenu. We can now tick the two boxes Solid and Centre view on me. The end result is shown in the following screenshot:
2. Now move on to give the Solid attribute to the grass and dirt tiled backgrounds.
3. To stop the player leaving the level, create a new tiled background called
WorldBorder
and place three of them: one for the bottom and two for the sides of the layout, as in the following screenshot. Tick Solid for these as well.4. Finally, scroll down to the Properties menu (outside of Groups), and untick Transparent fill for the
WorldBorder
object and choose WebGreen as the Fill color. Notice in the following screenshot, the world border on the...