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

#1 2010-08-16 17:00:34

samurai768
Scratcher
Registered: 2009-07-21
Posts: 1000+

How do I make...

... a four way scroller that will let the character roam freely around the screen if the maxium x or y is reached?

Like, if you reached the end of the scrolling plane, it would let you move around (not scrolling) until you turned around and went the other way? Sorta hard to explain, I just need help  tongue  I will give more detail later.

EDIT: Ah! I've got the perfect example: http://scratch.mit.edu/projects/archmage/73387

I want that except 4 four scrolling  tongue

Last edited by samurai768 (2010-08-16 17:12:55)

Offline

 

#2 2010-08-16 23:31:48

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: How do I make...

Edited because I completey misread the OP, sorry. I thought you wanted a scroller that would allow the player to walk so far without scrolling, but start scrolling once you got close to the edge of the screen. Lol.
_________________________________________________________

Just take a 4 way scroller, and set it to stop scrolling once you get to a limit. Personally, I would want to make it so that once it starts scrolling, the player begins moving back towards the center of the screen, maybe? Seems like I noticed that a long time ago when watching some scrolling game.

Here are three of my 4-way scroller project. None of them have the "walk then scroll" feature but it shouldn't be to difficult to add.

http://scratch.mit.edu/projects/Locomule/707613
http://scratch.mit.edu/projects/Locomule/798042
http://scratch.mit.edu/projects/Locomule/708768

Last edited by Locomule (2010-08-18 01:43:52)


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#3 2010-08-17 07:38:11

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: How do I make...

Simply have limits to the area he walks in.  Say the z max is 240, min is -240, y is 180 and -180.  If it's in that zone it scrolls,  otherwise it moves seperately.  You need to make something like this for whenever an arrow is pressed:  if (key) key pressed, if (x or y) < or > (depending on the button) limit, change (x or y) by 5, else change scroll(x or y) by 5.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

Board footer