This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-01-18 19:24:11

atomic7732
Scratcher
Registered: 2009-08-30
Posts: 14

Help

Okay, so I'm making a racing game. Since I haven't seen any where they have a realistic sized track (one that goes off screen and scrolls), I tried to make one. I have run into a problem though. If my car runs to 150 px on the x axis, it will stop moving. This isn't the problem. The problem is the fact that I can't get the car to turn back, because I make movement disable (so the car itself doesn't go off the screen) when it reaches this point. How could I code it to make it work?

To see what it does, go to Excelsior Raceway, click the saw, and press up (to accelerate).

Project link: http://scratch.mit.edu/projects/atomic7732/1542145

Last edited by atomic7732 (2011-01-18 19:24:54)

Offline

 

#2 2011-01-18 21:34:58

hpotter134
Scratcher
Registered: 2010-02-21
Posts: 100+

Re: Help

I tried to fix it here

What I did was make more realistic background scrolling (using trig) and I checked whether or not the direction was toward the edge.

Tell me whether or not that helped.


http://i45.tinypic.com/fxgtvc.png

Offline

 

#3 2011-01-18 21:49:05

atomic7732
Scratcher
Registered: 2009-08-30
Posts: 14

Re: Help

It works! Thanks for your help!

Edit: Blah you broke my Excelsior track. lol XD I can import the image again. It's supposed to be in sections to make it so it doesn't resize the image...

Last edited by atomic7732 (2011-01-18 21:55:11)

Offline

 

Board footer