Unit 3 flyer Game

Link to the project or level: https://studio.code.org/s/csd3-2019/stage/18/puzzle/16?section_id=2275140&user_id=54578758
**What I expect to happen:**character to move, to bounce off sides and obstacle
**What actually happens:**character doesn’t move

this students game does not work as well

@lorien_cafarella The links that you included are not available for sharing. I imagine you need to turn on the sharing option for these classes so others can see the code. Check out this article on sharing to see if you need to make a change in the class settings.

sharing is set up now

There are a couple problems that I see,

  1. You can’t name your variable “line” (created on line 17 of your code). This is a reserved word – it is used in the drawing toolbox. You should change it to something like “line2” since you already have a “line1”
  2. Your animations for your border lines have a lot of empty space around the actual lines. You need to crop out that space. The character sprite is colliding with all 4 border lines because they actually take up the entire screen.
    If you put in the following code, you can see the edges of the line1, line2, right, and left sprites.

You will see this when you run the code:


The way to correct the problem:

  1. go to the animations tab.
  2. Select each one of your animations for the lines
  3. Then select the tool that will crop the empty space out.

This will remove all the empty space around the line and will look like this:

That should correct the problem.

Here is a link to the code that I corrected: