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

#1 2010-06-16 07:39:26

mopper2
Scratcher
Registered: 2010-05-31
Posts: 33

scrollex script

I need help with my script for scrollex. can somone help? just leave the script and the one who helps will get 4 love its (even if i dont love it) 10 favorites (same as the last one)                 ps.


i know it starts like this...




                                   <when green flag clicked>



or some thing like that...


MOPPER2

Offline

 

#2 2010-06-16 07:43:10

mopper2
Scratcher
Registered: 2010-05-31
Posts: 33

Re: scrollex script

<when green flag clicked>
<forever>
<move( 100 )steps>
<end>


MOPPER2

Offline

 

#3 2010-06-16 08:29:25

da123
Scratcher
Registered: 2010-01-15
Posts: 35

Re: scrollex script

Ok, here's how i know how to help.

Make a variable called ScrollX (or anything else).

Then make the sprite you want to move with these scripts:


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

<when green flag clicked>
<forever>
<if><key[left arrow]pressed?>
<change{ScrollX}by(-5
<end>


blocks]<when green flag clicked>
<forever>
<if><key[right arrow]pressed?>
<change{ScrollX}by(5


<when green flag clicked>
<forever>
<if> <touching color[color of ground]
<change y by(-5
<if><touching color[color of ground]
<change y by( 2
<end>

<when green flag clicked>
<forever>
<if><key[up arrow]pressed?>
<repeat( 20
<change y by(5
<end>

Then, make sprites for the ground, and call them terrain0, terrain1, depending on the order you want them to show, so terrain15 would be the 16th sprite to show. But you have to start with terrain0.

Then make these scripts for all terrains:

<when green flag clicked>
<forever>
<set x to( ((<{ScrollX}>  <+>(( 480 <*>Number of terrain)) ))
<end>[/blocks]


Hope this helps!

~da123

Offline

 

#4 2010-06-16 10:51:56

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

Re: scrollex script

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


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

Offline

 

#5 2010-06-17 01:11:21

Chrischb
Scratcher
Registered: 2008-07-24
Posts: 1000+

Re: scrollex script

This might help...  smile


I fall: It's a tragedy. You fall: It's comedy.
Hmph enjoy your fall - I get a lovely spring... without pans of new leaves.

Offline

 

#6 2010-06-17 19:48:05

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

Re: scrollex script

a little searching around would do you a lot of good, I think


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

Offline

 

Board footer