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

#1 2013-03-29 12:30:23

Jinx98_test
Scratcher
Registered: 2012-05-14
Posts: 4

Help Needed With Jumping Sensor Scripts

I have recently been working on a scrolling project and I've run into a bit of trouble. My left, right, and down sensors all work fairly well. However the up sensor doesn't. I can't figure out so, when the jump key is pressed(w), that the sprite will jump, but if he hits something he'll stop and bounce back down. I can get it so he wont jump at all if he senses something above him, but not so he bounces off of it. Here is the link to the project if you want to see for yourself what I'm talking about  wink  http://beta.scratch.mit.edu/projects/10093309/
Any help is appreciated.

      ~Jinx,

Offline

 

#2 2013-04-09 16:04:55

Jas0nta11
New Scratcher
Registered: 2013-04-07
Posts: 3

Re: Help Needed With Jumping Sensor Scripts

when gf clicked
forever
if touching color <grey>
change y by <-1>
end

Offline

 

#3 2013-04-10 13:15:02

Jinx98_test
Scratcher
Registered: 2012-05-14
Posts: 4

Re: Help Needed With Jumping Sensor Scripts

Thanks.

Offline

 

#4 2013-04-10 16:22:00

SFollis
Scratcher
Registered: 2012-03-04
Posts: 76

Re: Help Needed With Jumping Sensor Scripts

Jas0nta11 wrote:

when gf clicked
forever
if touching color <grey>
change y by <-1>
end
end

when gf clicked
forever
if <touching color [#000000]?>
  change y by (-1)
end

fixed  wink


http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1 is a picture of my project http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=text&amp;num=1 which has http://blocks.scratchr.org/API.php?user=SFollis&amp;action=projects&amp;type=newest&amp;return=views&amp;num=1 views

Offline

 

Board footer