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

#1 2008-09-23 12:24:45

shikamaru19
Scratcher
Registered: 2008-06-24
Posts: 26

how can i do this

how can i like make it so the sprite doesnt go through walls or the ground but if he jumps he can go up.

Also, how do u make him jump

thx.

Offline

 

#2 2008-09-23 12:32:22

zawicki1fromyoutube
Scratcher
Registered: 2008-07-31
Posts: 1000+

Re: how can i do this

for your second question, just do
<when[ What ever Key You Want ]key pressed>
<point in direction( 0
<move(10  )steps>
<switch to costume[ jump
<wait( 0.1 )secsc>
and keep repeating untill your as high as you want, then you do:

<move( -10 )steps>
<switch to costume[ falling
<wait( 0.1 )secsc>

hope it helped!


|Call Of Duty: Black Ops Wii Friend Code: 3519-4456-0013|
|Follow me on Twitter|Subscribe To My Youtube Channel

Offline

 

#3 2008-09-23 14:16:02

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

Re: how can i do this

[blocks]<when green flag clicked>
<forever>
  <if><key[ Up ]pressed?>
  <set{ Jump velocity }to( lets say 10? )>
  <repeat( 10 )>
    <change{ Jump velocity }by( -1)>
    <end>
  <end>
<end>

<when green flag clicked>
<forever>
<change y by( <{ Jump velocity }>
<change y by( <{ Gravity }> )

Then you need gravity
<when green flag clicked>
<forever>
<change{ Gravity }by( -0.1 )>
  <wait until><touching color[ What ever you want the floor's color to be ]>
<end> [/blocks]
Hope that helps. If it doesint, sorry.

Offline

 

#4 2008-09-23 15:31:49

shikamaru19
Scratcher
Registered: 2008-06-24
Posts: 26

Re: how can i do this

ok thx

Offline

 

#5 2008-09-23 16:46:37

shikamaru19
Scratcher
Registered: 2008-06-24
Posts: 26

Re: how can i do this

no it doesnt work

Offline

 

#6 2008-09-24 13:37:22

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

Re: how can i do this

what doesint work? post it up and ill see what i can do

Offline

 

Board footer