Coding Issue- How to make roller coaster temporarily stop along round path?

Hi! I am still a beginner using CoSpaces and I need a little assistance with a roller coaster scene I am creating. I would like for the student to go along a rollercoaster, but I would like for the rollercoaster to stop when the rollercoaster reaches a knowledge checkpoint. At this point the student must answer questions about the topic. After the questions are answered correctly, I would like for the rollercoaster to proceed as normal. I have tried the collision coding blocks but it seems that it is not working for me. Currently the rollercoaster proceeds as normal throughout the path and makes no stop and the questions fail to appear within the CoSpace as it is playing.

Share link: CoSpaces Edu :: Chromosome aberration Roller Coaster Quiz

Thank you.

Hi @nholifield1184,

Your approach to solve this problem was nearly correct! The reason why your script does not work as expected is because your collision handlers are created after the “move on path” CoBlock. In your current CoBlocks script the sled first moves through the entire path before any checkpoints collisions are created.

Here are some ideas to help you solve this issue:

  1. Move all collision event CoBlocks above the CoBlock that starts the path movement
  2. Use a function CoBlock to start and stop the path movement. You can take a look at this remixable space to see how it could be done

Hope this helps! :slight_smile:

2 Likes

Thank you so much! This was very helpful.