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

#1 2009-09-22 21:58:55

scratch_yoshi
Scratcher
Registered: 2009-06-12
Posts: 1000+

How to Scroll

For ScrollX, Use these blocks!
This is the scripts for the character:

[blocks]<when green flag clicked>
<set{ ScrollX }to( 0[/blocks]

[blocks]<when green flag clicked>
<forever if><key[ left arrow ]pressed?>
<point in direction( -90
<change{ ScrollX }by( How fast you want Him/Her to go
<end>[/blocks]

[blocks]<when green flag clicked>
<forever if><key[ right arrow ]pressed?>
<point in direction( 90
<change{ ScrollX }by( -How fast you want Him/Her to go
<end>[/blocks]
and for the terrains:

[blocks]<when green flag clicked>
<forever>
<set x to( (( <{ ScrollX }> <-> (( 480 <*> The number terrain you did )) ))
<end>[/blocks]
Also, the first terrain has to be 0!

Last edited by scratch_yoshi (2009-10-10 10:50:53)


Retired from Scratch, but just the language itself. Not the forums.

Offline

 

#2 2009-09-23 14:21:40

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: How to Scroll

The character doesn't need one! If its scrolling, he stays stationary!


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#3 2009-09-23 18:04:45

scratch_yoshi
Scratcher
Registered: 2009-06-12
Posts: 1000+

Re: How to Scroll

From markyparky56
The character doesn't need one! If its scrolling, he stays stationary!

Yeah, but you would want the character to AT LEAST be pointing in a different direction each time you press an arrow key! Right?

[blocks]<<  <and>  >>[/blocks] the character is controlling the WHOLE(nearly) level!

Last edited by scratch_yoshi (2009-11-01 14:49:28)


Retired from Scratch, but just the language itself. Not the forums.

Offline

 

#4 2009-09-24 11:11:11

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: How to Scroll

yeah, but if you've put a script in saying put him at this position on the X axis, its not gonna make him point in the right direction!


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#5 2009-09-25 20:02:41

scratch_yoshi
Scratcher
Registered: 2009-06-12
Posts: 1000+

Re: How to Scroll

From markyparky56
yeah, but if you've put a script in saying put him at this position on the X axis, its not gonna make him point in the right direction!

I think you're thinking about the scripts for the terrains. You should see Super Luigi Island or Sonic Challenge and look at the scripts!

Last edited by scratch_yoshi (2009-11-01 14:50:16)


Retired from Scratch, but just the language itself. Not the forums.

Offline

 

#6 2009-09-26 04:00:34

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: How to Scroll

scratch_yoshi wrote:

for the character,and for the terrains:

[blocks]<when green flag clicked>[/blocks]
[blocks]<set x to( (( <{ ScrollX }> <-> (( 480 <*> The number terrain you did )) ))[/blocks]
Also, the number terrain you doesn't really matter, the first terrain has to be 0 though!

Why would the character need to be moving! Its the terrains that need to!


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#7 2009-09-26 20:45:22

scratch_yoshi
Scratcher
Registered: 2009-06-12
Posts: 1000+

Re: How to Scroll

From markyparky56

From scratch_yoshi
and for the terrains:

[blocks]<when green flag clicked>[/blocks]
[blocks]<set x to( (( <{ ScrollX }> <-> (( 480 <*> The number terrain you did )) ))[/blocks]
Also, the number terrain you doesn't really matter, the first terrain has to be 0 though!

Why would the character need to be moving! Its the terrains that need to!

Which is what I'm trying to imply!  mad  Would you look at the top?!?! I edited it to make it clearer for you!!!!!!

Last edited by scratch_yoshi (2009-11-01 14:51:56)


Retired from Scratch, but just the language itself. Not the forums.

Offline

 

#8 2009-09-26 20:49:42

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

Re: How to Scroll

This guide is just a cheesey version of this one http://scratch.mit.edu/forums/viewtopic.php?id=2440

I don't think anyone will find this one useful because it doesn't explain things properly.

Last edited by archmage (2009-09-26 20:49:49)


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

 

#9 2009-09-27 12:08:39

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: How to Scroll

Thankyou! you fixed it!


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#10 2009-09-27 13:38:43

scratch_yoshi
Scratcher
Registered: 2009-06-12
Posts: 1000+

Re: How to Scroll

From markyparky56
Thankyou! you fixed it!

You are welcome! Highlight the rest------>Yay! The argument is over!  smile   wink   cool   big_smile

Last edited by scratch_yoshi (2009-11-01 14:52:47)


Retired from Scratch, but just the language itself. Not the forums.

Offline

 

#11 2009-09-28 18:11:32

scratch_yoshi
Scratcher
Registered: 2009-06-12
Posts: 1000+

Re: How to Scroll

From archmage
This guide is just a cheesey version of this one.

I don't think anyone will find this one useful because it doesn't explain things properly.

Which one are you talking about?

Last edited by scratch_yoshi (2009-11-01 14:54:23)


Retired from Scratch, but just the language itself. Not the forums.

Offline

 

Board footer