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

#1 2009-06-11 11:53:52

midnightwine
Scratcher
Registered: 2008-12-28
Posts: 14

Scrolling with Y and X momentum

Spine, Jakethespartan, Zelda 123, you know how to do this type of scrolling, could you help me with this?

Offline

 

#2 2009-06-12 03:28:52

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Scrolling with Y and X momentum

theres a tutorial about x scrolling. You can follow the exact same steps for y scrolling, except change the 480 to 360

Last edited by yambanshee (2009-06-12 03:29:18)

Offline

 

#3 2009-06-13 02:58:00

marcsteene
Scratcher
Registered: 2007-08-24
Posts: 48

Re: Scrolling with Y and X momentum

Just set a velocity variable, then use reporters to check how fast the sprite (whatever is scrolling) is moving

Offline

 

#4 2009-06-15 22:28:11

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Scrolling with Y and X momentum

I U Want To Move It In 2d With Stunning Look Use Trigonometric Functions With Chawnging Angles  That Works For Sure


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#5 2009-06-15 23:47:46

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Scrolling with Y and X momentum

Just use the code from this project
http://scratch.mit.edu/projects/archmage/100982


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#6 2009-06-16 01:56:13

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Scrolling with Y and X momentum

heres how to use trigongometric functions
make a variable speed( if u want acceleration else) else contant speed will do it will do
then x and y be ur scrolling coordinate variables
then
change y by -1 * cos of direction * speed
change x by -1 * sin of direction * speed

now changing ur direction u can run ur scroller very very nicely and smoothly giving it a realastic look .
--------------------------------------------------------------------------------------------------------------------------
_________________________________________________________________________________


Mathematics+Physics+Scratch = Total Fun

_________________________________________________________________________________
--------------------------------------------------------------------------------------------------------------------------

Last edited by fanofcena (2009-06-16 05:50:43)


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#7 2009-06-16 05:25:31

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Scrolling with Y and X momentum

fanofcena wrote:

...
change x by -1 * cos of direction * speed
...

I'm pretty sure you ment to type

change x by -1*sin of direction * speed

there


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#8 2009-06-16 15:44:56

midnightwine
Scratcher
Registered: 2008-12-28
Posts: 14

Re: Scrolling with Y and X momentum

Are you guys sure that what  you are posting will make the character jump? I mean, thanks for trying to help but I'm not sure about this. But could anyone get Zelda123 on this post.

Last edited by midnightwine (2009-06-16 15:48:23)

Offline

 

#9 2009-06-16 17:49:01

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Scrolling with Y and X momentum

You asked for scrolling, not jumping...

http://archblogger.wordpress.com/2008/11/06/make-a-game-like-super-mario-world-demo/

That is a full tutorial on how to make the kind of game you are describing. Zelda123 won't explain it to you any better.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#10 2009-06-20 20:54:03

metaknight2
Scratcher
Registered: 2008-05-26
Posts: 8

Re: Scrolling with Y and X momentum

Has anyone figured out midnightwine means VELOCITY? Once I get back from montana I'm making a velocity tutorial.. It'l* include scrolling, too.
[blocks]<when[ Metaknight2 ]clicked>
<say[ Bye! ]for( 5 )secs>
<go to[ somewhere on scratch ]>
<stop script> [/blocks]


*It will

Last edited by metaknight2 (2009-06-20 20:54:26)

Offline

 

Board footer