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

#1 2012-10-14 11:38:46

LordAwesome123
Scratcher
Registered: 2011-01-18
Posts: 100+

Double Jump?

Right, so I'm making a game and I want the player to be able to double jump. But. I can't figure out how to do it. I've tried a couple different scripts but none of them seem to work.

And if at all possible, on the double jump it would be cool to have the player (which is a square) do a 360 in the air before landing back down. But I'm afraid that will confuse the sensor sprite. Any possible solutions?


http://i672.photobucket.com/albums/vv82/coke457/cooltext538978807.png
When life gives you lemons... take them... free stuff is cool  smile

Offline

 

#2 2012-10-20 09:55:04

Walkthrough101
New Scratcher
Registered: 2012-10-17
Posts: 11

Re: Double Jump?

Dose this work?
[scratchblocks]
set [Jump v] to 0
if <key up arrow pressed v>
                   set [Jump v] to 1
                   Jump script
end
if <<key up arrow pressed> and <Jump = 1>>
Jump script

Offline

 

#3 2012-10-20 09:58:45

Walkthrough101
New Scratcher
Registered: 2012-10-17
Posts: 11

Re: Double Jump?

Dose this work?

set [Jump v] to 0
if <key up arrow pressed v>
                   set [Jump v] to 1 
                   Jump script
end
if <<key up arrow pressed> and <Jump = 1>>
Jump script

Offline

 

#4 2012-10-20 09:59:43

Willpower
Scratcher
Registered: 2012-01-26
Posts: 1000+

Re: Double Jump?

Walkthrough101 wrote:

Does this work?

set [Jump v] to 0
if <key up arrow pressed v>
                   set [Jump v] to 1 
                   Jump script
end
if <<key up arrow pressed> and <Jump = 1>>
Jump script

Spelling and Scratchblocks fixed- remember to add (/scratchblocks) In [] brackets to the end of your scratchblocks!

EDIT- hmm seems i was outposted by a mod who corrected your scratchblocks anyway. Thanks Mods! Oh no it was you again  cool  I'll stop speaking now  lol

Last edited by Willpower (2012-10-20 10:02:24)


http://i49.tinypic.com/e84kdj.png

Offline

 

#5 2012-10-20 16:25:03

gfchll
Scratcher
Registered: 2012-04-21
Posts: 100+

Re: Double Jump?

Walkthrough101 wrote:

Dose this work?

set [Jump v] to (0)
if <key [up arrow v] pressed ? >
                   set [Jump v] to (1) 
                   Jump script
end
if <<key [up arrow v] pressed ?> and <(Jump) = (1)>>
Jump script

fixed

Last edited by gfchll (2012-10-20 16:25:23)


HELLO EVERYBODY!

Offline

 

#6 2012-10-21 19:34:51

Walkthrough101
New Scratcher
Registered: 2012-10-17
Posts: 11

Re: Double Jump?

gfchll wrote:

Walkthrough101 wrote:

Dose this work?

set [Jump v] to (0)
if <key [up arrow v] pressed ? >
                   set [Jump v] to (1) 
                   Jump script
end
if <<key [up arrow v] pressed ?> and <(Jump) = (1)>>
Jump script

fixed

How was that done, I mean with the colors?

Offline

 

#7 2012-10-21 19:38:45

dvd4
Scratcher
Registered: 2010-06-30
Posts: 1000+

Re: Double Jump?

Walkthrough101 wrote:

gfchll wrote:

Walkthrough101 wrote:

Dose this work?

set [Jump v] to (0)
if <key [up arrow v] pressed ? >
                   set [Jump v] to (1) 
                   Jump script
end
if <<key [up arrow v] pressed ?> and <(Jump) = (1)>>
Jump script

fixed

How was that done, I mean with the colors?

It was done by making the scratch blocks in the correct syntax.


I made a mod  big_smile  It's called blook!
http://i49.tinypic.com/16ia63p.png

Offline

 

Board footer