1

I've tried multiple outputs for the program and nothing. I've singled out that some random program inside the sprite somewhere must be canceling out my program for that sprite. Here is the link to the project, just click "look inside" to see my program. https://scratch.mit.edu/projects/500277397

Here's my scratch code.

ggorlen
  • 44,755
  • 7
  • 76
  • 106
Eggybunz
  • 21
  • 2
  • 1
    Looks like you've solved the problem--maybe you could post a [self answer](https://stackoverflow.com/help/self-answer) explaining how you did it to help others with the same problem. I'm guessing it was a matter of using `forever` rather than `repeat` around the `if touching wall` condition. Thanks! – ggorlen Mar 13 '21 at 16:44
  • I literally just made a new sprite and copied the exact same program onto the new sprite. – Eggybunz Apr 26 '21 at 20:18

1 Answers1

1

You just need to reverse steps once it touches the wall. No other fancy stuff needed

when green flag clicked
forever
    if key space pressed
        move (put number of steps) steps
        if touching wall
            move -(put number of steps) steps
CoderTang
  • 460
  • 5
  • 14