Collision Enter

image\Trigger_Collision_Enter.jpg

The Collision Enter trigger allows you to trigger an action when one object enters the same space as another object on screen. As well as this trigger, there is also a Collision Leave trigger.

Note:
Both the Collision triggers are mainly used to create interactive games. For example, you could create ‘bat and ball’ games. The ball could be an object that bounces randomly across the screen. A Collision Enter trigger could be set on the ball, so that any time the ball crosses or enters the space of the bat object, the trigger is activated, which in this example could change the direction and angle of the balls bounce, thereby giving the appearance that the bat hit the ball in a different direction.

Setting up the Collision Enter trigger:

1. Add the Collision Enter trigger to your Actions Organiser, as described in Creating and Editing Actions. The Collision Enter tab will automatically appear when you add the trigger.

Note:
The trigger should be added to one of the objects involved in the collision – the other object involved should be selected from the Object List – see point 2 below.

2. Click on checkbox beside the name of the objects in the Object List that you want to start this trigger.

Note:
The list of objects may be indented – see Indented Objects in an Object List for more information.

3. Click on the Apply button to save your changes.

4. Click on the Actions tab in the Actions dialog to select an action or actions to add to the trigger.

5. Go to Choosing an Action to list all of the actions you can add to your trigger.

Related Topics:

Introducing the Advanced Triggers

Choosing a Trigger