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

#1 2012-07-10 12:07:31

Jinx98
Scratcher
Registered: 2011-03-30
Posts: 4

Scroller

Hello
I have recently started making a scrolling game. I have been able to make the scrolling engine and terrain. Ive come across a problem though. I cant figure out how to have the terrain not scroll once the player has run up against a wall.
Also i wanted to the terrains y position change as the character jumps up and down, for example when your character jumps onto a block the block would scroll down as if your climbing up. That way i could have higher elevations.

   Any help is appreciated!

  Jinx98

P.s( My scrolling project is posted on Jinx98_test )

Offline

 

#2 2012-07-10 12:08:33

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: Scroller

I'll fix it for you.

EDIT: Sorry, I failed.  sad

Last edited by SciTecCf (2012-07-10 12:32:04)


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

#3 2012-07-10 12:20:43

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Scroller

In your movement script have "if not touching colour" or "if not touching wall", the your changing of scrollx


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#4 2012-07-10 12:42:24

Jinx98
Scratcher
Registered: 2011-03-30
Posts: 4

Re: Scroller

zammer990 wrote:

In your movement script have "if not touching colour" or "if not touching wall", the your changing of scrollx

If I do that, when the player is touching the terrain he cant move.

Last edited by Jinx98 (2012-07-10 12:43:34)

Offline

 

#5 2012-07-10 12:59:45

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Re: Scroller

Have a sensing sprite.


http://i47.tinypic.com/2iaa73k.png

Offline

 

#6 2012-07-10 13:15:04

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

Re: Scroller

I have my walls have different colors so that the sprite reacts differently towards each wall. If you do it this way you can say that: If key (d) is pressed and If not touching (color) change scrollx by 5 same with the other key only with the other wall color.


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

Board footer