Tutorial

Page 6 of 9

The Collision Event

  1. Press the Add Event button. In the Event Selector click on the Collision Event button and select "obj_wall". The collision event between "obj_clown" and "obj_wall" is now added to the list of events.

  2. Include a Bounce action by dragging it from the page at the right (from the "Move" tab, "Jump" section).

  3. Leave the default values for this action. We are not interested in precise bounces and we want to bounce against solid objects (since we flagged the "obj_wall" object as solid in it's object properties).



  4. Select the tab "Main1", and from it include the Play Sound action in the collision event action list.

  5. Drag the Play Sound action below the Bounce action already present. In the action window, click on the icon to the right of the Sound property which will bring up a list of all available sound assets (from the resource tree), and from the list select "snd_bounce". Leave the Loop property as false since we want to play the sound only once, not have it looping constantly.

The wall now has two actions to be performed when a collision occurs.

© Copyright YoYo Games Ltd. 2014 - Updated for KS3, by Mr. Robinson