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

#1 2011-11-05 12:42:41

TM_
Scratcher
Registered: 2010-07-22
Posts: 500+

Script for munkle

Doublejump script:
(script of the controlling sprite)

when green flag clicked
forever
  if <touching [ ground v ]>
    set [move y v ] to ( 1)
    set [jump v ] to ( 1 )
        end
  change y by ( move y) 
  change [ move y v ] by ( -0.5)
  end


when gf clicked
forever
 if <<key[ up arrow v ]pressed?> and < touching [ ground v ]>>
      set [ move y v ] to ( 10 )
       wait until <<not <key [up-arrow v] pressed?>> or < touching [ground v]>>
       wait until < <key [up-arrow v] pressed?> or < touching [ground v]>>
if <key[ up arrow v ]pressed?>
    if <  (jump) = (1) >
      set [jump v ] to ( 0 )
      change [ move y v ] by ( 10 )
    end
  end



Last edited by TM_ (2012-08-12 07:19:04)


http://scratch.mit.edu/static/projects/TM_/2323675_sm.pnghttp://scratch.mit.edu/static/projects/TM_/2822911_sm.pnghttp://scratch.mit.edu/static/projects/TM_/2489524_sm.png

Offline

 

#2 2011-11-05 18:49:24

munkle
Scratcher
Registered: 2011-02-23
Posts: 34

Re: Script for munkle

can you do it without vel. because my scratch com. dosent let me do vel. D=  sad

Offline

 

#3 2011-11-06 05:42:17

TM_
Scratcher
Registered: 2010-07-22
Posts: 500+

Re: Script for munkle

Remove all vel blocks and add move y by ...


http://scratch.mit.edu/static/projects/TM_/2323675_sm.pnghttp://scratch.mit.edu/static/projects/TM_/2822911_sm.pnghttp://scratch.mit.edu/static/projects/TM_/2489524_sm.png

Offline

 

#4 2012-01-29 11:40:52

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: Script for munkle

You can update this with the awesome new scratchblocks.  smile


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#5 2012-08-01 17:35:11

munkle
Scratcher
Registered: 2011-02-23
Posts: 34

Re: Script for munkle

Thanks! It didn't work for double jump but only 1 jump but i get how to make it 2 jumps.

Offline

 

#6 2012-08-01 17:47:24

munkle
Scratcher
Registered: 2011-02-23
Posts: 34

Re: Script for munkle

Dang, i tried to do double jump but it didn't work.  sad

Offline

 

#7 2012-08-01 17:54:59

munkle
Scratcher
Registered: 2011-02-23
Posts: 34

Re: Script for munkle

Wait, now i get it, you might of made a mistake because it has to touch the ground and mid air is not ground XD you helped me understand it

Offline

 

#8 2012-08-01 18:04:05

munkle
Scratcher
Registered: 2011-02-23
Posts: 34

Re: Script for munkle

Great! It did help! Only the character falls through the ground =P

Offline

 

#9 2012-08-01 18:09:03

munkle
Scratcher
Registered: 2011-02-23
Posts: 34

Re: Script for munkle

Oh i fixed it! But nwo the 2nd jump doesn't work. Guess i'll just have to wait to do it. XD

Offline

 

#10 2012-08-01 18:34:38

munkle
Scratcher
Registered: 2011-02-23
Posts: 34

Re: Script for munkle

Now i know what to do! But i don't know how to do it. Make the jump not depend if it goes down. Or i could make a new variable... =l

Offline

 

#11 2012-08-01 19:24:50

munkle
Scratcher
Registered: 2011-02-23
Posts: 34

Re: Script for munkle

Made a new variable- Just made it always automatically jump  sad

Offline

 

#12 2012-08-12 07:19:36

TM_
Scratcher
Registered: 2010-07-22
Posts: 500+

Re: Script for munkle

try the new script, i think it should work, but now i have not the time to test it


http://scratch.mit.edu/static/projects/TM_/2323675_sm.pnghttp://scratch.mit.edu/static/projects/TM_/2822911_sm.pnghttp://scratch.mit.edu/static/projects/TM_/2489524_sm.png

Offline

 

#13 2012-08-14 10:35:39

munkle
Scratcher
Registered: 2011-02-23
Posts: 34

Re: Script for munkle

Can't jump.  lol

Offline

 

Board footer