Time for action – examining the collision group settings

The game file to import and load for this session is 5961_03_07.stencyl.

We need to open up the Collision Groups window in the Stencyl Settings dialog box:

  1. Click the Settings icon on the main Stencyl toolbar.
  2. Look down the list of icons that are shown in the left panel of the Game Settings dialog box and click on Groups.
  3. In the Collision Groups window that is now being displayed, click on Tiles under the GROUPS heading at the top of the right-hand panel.

What just happened?

We have displayed the current collision settings for the Tiles group as shown in the following screenshot:

What just happened?

The Collides With section in the previous screenshot, which has been highlighted with an oval shape, shows which other collision groups have been configured to collide with the Tiles collision group. Currently, both the Players and the Actors collision groups are configured to collide with the Tiles group (remember, the Tiles group is the one we selected in the right-hand panel). Note that the Players button and the Actors button are shaded darker than the Tiles button, which shows us that they are currently selected.

This means that any actor that is placed in the Players group or the Actors group will react to a collision with a tile. Note that, if we configure a group such as Tiles to collide with Players, then the Players group will automatically be updated to reflect this change!

Viewing the actors' collision groups

We now know that tiles are configured to react to collisions with any actor which is in either the Players or Actors group, so let's see which groups Players and Actors are configured to detect collisions with.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.110.189