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

#1 2011-04-20 17:58:41

TheBlueRocky
Scratcher
Registered: 2010-07-08
Posts: 500+

I'll help with Scripts.

I'm very talented at scripting, so if you need help on your projects, just ask me!  big_smile

Offline

 

#2 2011-04-22 16:16:43

stuart6854
New Scratcher
Registered: 2011-04-01
Posts: 3

Re: I'll help with Scripts.

Hi iv been set a task for my computing class, my class were learning about scratch but i got ahead of the class so my teacher gave me a challenge, which was to remake Manic Miner on scratch but i need help with getting the sprite u control to go Left/Right while he's in mid-air(Jumping)

Plz if you could help me i would be so greatful!

Offline

 

#3 2011-04-22 16:34:16

TheBlueRocky
Scratcher
Registered: 2010-07-08
Posts: 500+

Re: I'll help with Scripts.

Put the movement into one whole script using forever, if, key ? Pressed, (action). Then put another if for the next movement. As long as you don't use repeat blocks in the ifs, it should work out fine.  smile

Offline

 

#4 2011-04-23 13:29:57

stuart6854
New Scratcher
Registered: 2011-04-01
Posts: 3

Re: I'll help with Scripts.

TheBlueRocky wrote:

Put the movement into one whole script using forever, if, key ? Pressed, (action). Then put another if for the next movement. As long as you don't use repeat blocks in the ifs, it should work out fine.  smile

Ok thanks i'll try it i'll post back i it works or not

Offline

 

#5 2011-04-23 13:43:22

stuart6854
New Scratcher
Registered: 2011-04-01
Posts: 3

Re: I'll help with Scripts.

<when green flag clicked><forever><if><key[  ]pressed?>
and so on so fourth, but the guy dosnt jump and move forward at the same time.

Offline

 

#6 2011-04-27 16:52:51

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: I'll help with Scripts.

To fix this problem, do these 3 scripts instead of one:
[blocks]<when green flag clicked>
<forever>
<if> <key[ space ]pressed?>
<repeat( [jump in pixels]
<change y by( 1
<end>
<end>

<when green flag clicked>
<forever>
<if> <key[ right ]pressed?>
<change y by( 1
<end>

<when green flag clicked>
<forever>
<if> <key[ left ]pressed?>
<change y by( -1
<end>[/blocks]

Now the jump will not affect the other areas because it's held on different scripts. Hope that helps!

P.S. I did add the blocks tags.

Offline

 

Board footer