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

#1 2011-08-11 14:33:50

gerbils800
Scratcher
Registered: 2010-04-27
Posts: 500+

Please Help!

I'm trying to make a scrolling game with this by Liquidmetal: http://scratch.mit.edu/projects/LiquidMetal/1920486 . I'm trying to make it so that some parts are outlined with black, so you know you can't get in...but how do I stop the sprite from going into these places? Please reply!  smile

Offline

 

#2 2011-08-11 15:01:09

gerbils800
Scratcher
Registered: 2010-04-27
Posts: 500+

Re: Please Help!

bump.

Offline

 

#3 2011-08-11 16:18:35

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Please Help!

<forever>
     <if><key[ right arrow ]pressed?>
          <change{ scrollx }by( 2 )>
          <if><touching color[ black ]>
               <change{ scrollx }by( -4 )>
          <end>
     <end>


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#4 2011-08-11 19:42:15

gerbils800
Scratcher
Registered: 2010-04-27
Posts: 500+

Re: Please Help!

Thanks!!!!  big_smile

Offline

 

#5 2011-08-12 10:34:56

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Please Help!

No problem.  Oh, and for more information:  I made it change scrollx by -4 which counteracts the scrollx by 2 before it.  In a non-scroller, this could be a perfect counter-action and it would look better, but since there is a slight delay in scrollers, I thought that doubling the original move would be safer.  You could try making it scrollx by -2 instead of -4 and it may look better, or you could get stuck in a wall.


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#6 2011-08-12 10:48:39

Rick3137
Scratcher
Registered: 2010-01-22
Posts: 57

Re: Please Help!

That's a problem that's more tricky than it looks. I have a maze game in my stuff that trys to do that and I never can quite get all the bugs out of it.

Offline

 

Board footer