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

#1 2008-08-06 18:09:56

newareagle
Scratcher
Registered: 2008-06-10
Posts: 100+

Creating a "Walljump" effect

Hello. I am making a pretty advanced game called "n-" (May be changed.) One of the key features the ability to walljump from side to side. I have a fairly simple method, but you can still move side to side on the wall and you cant actually jump. Heres the link to the project and thanks for looking!

http://scratch.mit.edu/projects/newareagle/234638


My Guitar Hero Game.
8/9 Projects on the Front Page at Once!

Offline

 

#2 2008-08-07 15:51:53

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Re: Creating a "Walljump" effect

Wow. I'm a big fan of the original game, and...here goes...

Make a new variable called walljump-angle. Play around with the value to get the right effect (keep it positive)

[blocks]<if><<<touching color[ color of walls <and>  <key[ up arrow ]pressed?>>>
<if><( <{ x velocity }> <<> 0 )>
<set{ x velocity }to( <{ walljump angle }>
<end>
<if><( <{ x velocity }> <>> 0 )>
<set{ x velocity }to( ((  <{ walljump angle }> <*> -1 ))[/blocks]
<end>
<end>

Last edited by bhz (2008-08-07 15:53:50)

Offline

 

#3 2008-08-08 12:53:53

newareagle
Scratcher
Registered: 2008-06-10
Posts: 100+

Re: Creating a "Walljump" effect

Good idea, i was thinking also if I made it so when you touch the wall, it sets how fast you were going when you hit it, then when you press up, you jump a little bit and then go xvelocity based on your old xvelocty * -1. Maybe i will try implementing it in my full game!


My Guitar Hero Game.
8/9 Projects on the Front Page at Once!

Offline

 

Board footer