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

#1 2012-08-10 20:43:29

GoldTube
New Scratcher
Registered: 2012-08-07
Posts: 83

Any way to wall jump without wall sensors?

So basically the question is the title.

Offline

 

#2 2012-08-10 21:14:04

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Any way to wall jump without wall sensors?

This should do it (assuming you're not using animations)

when gf clicked
forever
if<key [right arrow v] pressed?>
change [x-vel v] by (0.2)
end
if<key [left arrow v] pressed?>
change [x-vel v] by (-0.2)
end
change x by (x-vel)
if<touching [wall/floor v]?>
set [x-vel v] to ((-0.5)*(x-vel))
change x by (x-vel)
if<touching [wall/floor v]?>
change x by (x-vel)
end
if<<key [up arrow v] pressed?> and <(y-vel) < (0)>>
set [y-vel v] to (3)
if<(x-vel) > (0)>
set [x-vel v] to (2)
else
set [x-vel v] to (-2)
end
end
end
change [y-vel v] by (-0.2)
change y by (y-vel)
if<touching [wall/floor v]?>
set [x-vel v] to ((0.96)*(x-vel))
set [y-vel v] to ((-0.5)*(y-vel))
change y by (y-vel)
if<touching [wall/floor v]?>
change y by (y-vel)
end
if<<key [up arrow v] pressed?> and <(y-vel) > (0)>>
set [y-vel v] to (4)
end
else
set [x-vel v] to ((x-vel)*(0.98))
end


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#3 2012-08-10 22:08:24

GoldTube
New Scratcher
Registered: 2012-08-07
Posts: 83

Re: Any way to wall jump without wall sensors?

If only I could download scripts from the forums...

Offline

 

#4 2012-08-11 13:32:47

GoldTube
New Scratcher
Registered: 2012-08-07
Posts: 83

Re: Any way to wall jump without wall sensors?

Does this work with walls that are in different angles?

Not that I have walls in different angles.

Offline

 

#5 2012-08-11 16:57:15

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Any way to wall jump without wall sensors?

GoldTube wrote:

Does this work with walls that are in different angles?

Not that I have walls in different angles.

It works with walls with non-90-degree angles insofar that you'll never end up inside a wall.  But (and these are just the glitches that come to mind, I haven't actually tried it):

- you won't be able to walk up slopes
- when you jump on a slope it could be treated as a wall jump OR a "floor jump"
- you won't bounce correctly off of walls; they'll all be treated as 90-degree walls (you'll never end up inside, but your motion won't be accurate.

Summary: if you want to, you can use it for non-90 degree walls, but the result will likely be less than satisfactory.  If you're interested, this project allows you to use sloped floors and uses a script that functions on essentially the same principle (using the sprite itself as the sensor); bouncing still treats walls like they are 90-degrees, but at least it allows for slopes.  It doesn't have wall jumping though (I could probably add it, but it would be a kind of difficult to differentiate between "slopes" and "walls").


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#6 2012-08-11 22:37:10

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Any way to wall jump without wall sensors?

GoldTube wrote:

If only I could download scripts from the forums...

I have a wall-jumpin engine here. You could take a look. Im pretty sure it works the same way MoreGamesNow's script does.


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#7 2012-08-12 03:24:42

Edwardscrach
Scratcher
Registered: 2012-07-14
Posts: 64

Re: Any way to wall jump without wall sensors?

here is one
[scratchblocks]
when [up arrow ] pressed
change Y by (20)
wait (0.5) secs
change Y by (-20)


http://mag.racked.eu/mcimage/i6000/Achievement+got%21/edwardscrach+is+cool%21%21%21/mca.pnghttp://mag.racked.eu/mcimage/i46/Achievement+got%21/This+text+is+random.../mca.pnghttp://mag.racked.eu/mcimage/i6001/Achievement+got%21/Zombies%21%21%21/mca.pnghttp://mag.racked.eu/mcimage/i94/Achievement+got%21/I+love+Minecraft%21/mca.png

Offline

 

#8 2012-08-14 13:58:52

GoldTube
New Scratcher
Registered: 2012-08-07
Posts: 83

Re: Any way to wall jump without wall sensors?

Bump! Just in case I forget about this...

Offline

 

#9 2012-08-16 21:28:35

GoldTube
New Scratcher
Registered: 2012-08-07
Posts: 83

Re: Any way to wall jump without wall sensors?

GoldTube wrote:

Bump! Just in case I forget about this...

Offline

 

#10 2012-08-17 13:33:13

GoldTube
New Scratcher
Registered: 2012-08-07
Posts: 83

Re: Any way to wall jump without wall sensors?

I have a question:

If you want to wall jump farther, which part of that script would you use?
Jump higher?

Offline

 

#11 2012-08-17 14:44:22

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Any way to wall jump without wall sensors?

You can change "set [y-vel v] to (4)" to a bigger number to jump higher.

You can change "set [y-vel v] to (3)" to a bigger number to wall-jump higher.

Alternatively you can decrease the force of gravity ("change [y-vel v] by (-0.2)") which will result in both being higher.

Last edited by MoreGamesNow (2012-08-17 14:45:43)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#12 2012-08-19 09:46:57

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Any way to wall jump without wall sensors?

I can't jump...

For some reason...


Get ready for domination of:  tongue

Offline

 

#13 2012-08-19 14:09:10

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Any way to wall jump without wall sensors?

Bump.
This is urgent.
You can't jump...


Get ready for domination of:  tongue

Offline

 

#14 2012-08-19 15:12:48

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Any way to wall jump without wall sensors?

JUMP UP, AND BUMP!

lol


Get ready for domination of:  tongue

Offline

 

#15 2012-08-19 15:36:36

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Any way to wall jump without wall sensors?

Get rid of the second "(yvel) > (0)" conditional.  I posted this on the other thread, but you must have missed it  smile


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#16 2012-08-19 15:38:26

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Any way to wall jump without wall sensors?

condinitional?


Get ready for domination of:  tongue

Offline

 

#17 2012-08-19 15:40:43

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: Any way to wall jump without wall sensors?

Conditionals are the hexagonal blocks that evaluate to true or false.  He's saying to get rid of the (yvel) > (0) conditional.

Offline

 

#18 2012-08-22 12:06:12

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Any way to wall jump without wall sensors?

Double oops: the real problem is that in the actual project you copied it down with a  "less than" sign rather than a "greater than" sign.  You're probably thoroughly annoyed with me now   tongue


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#19 2012-11-19 14:15:27

Edwardscrach
Scratcher
Registered: 2012-07-14
Posts: 64

Re: Any way to wall jump without wall sensors?

Edwardscrach wrote:

here is one

when [up arrow v] key pressed
change Y by (20)
wait (0.5) secs 
change Y by (-20)

fixed-but this is jump not wall jump


http://mag.racked.eu/mcimage/i6000/Achievement+got%21/edwardscrach+is+cool%21%21%21/mca.pnghttp://mag.racked.eu/mcimage/i46/Achievement+got%21/This+text+is+random.../mca.pnghttp://mag.racked.eu/mcimage/i6001/Achievement+got%21/Zombies%21%21%21/mca.pnghttp://mag.racked.eu/mcimage/i94/Achievement+got%21/I+love+Minecraft%21/mca.png

Offline

 

Board footer