Colliding with multiple objects

In Scene 4 of this CoSpaces Edu :: Project 1, my student wants to restart the scene each time he collides with a square or circle. However, it only works on the last collision in his code. Note…the code may look weird now because we have changed it so often. Why can’t he restart scene with each collision? I feel like we have done this before and it should be simple.

Hi Kelly,

If you have 2 events with the same initial collision item (e.g. when Camera collides with …), the 2nd event overrides the first.

There are 2 ways around this:

  1. Put the Item you want to collide with in the initial collision item (e.g. when policewoman collides with …)

  2. Use the Advance CoBlocks collision event, which puts the thing you’ve collided with into a variable, which you can then check the name of to see if it’s the floor, a policewoman, or in a list of objects that should restart the scene when collided with.

Hope that helps! Let me know if you have any further questions.

Geoff @ TechLeap