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

#1 2010-05-15 05:07:43

freddythef
Scratcher
Registered: 2010-04-30
Posts: 25

Any ideas

Hio,
I recently caused a bug fixing the physics in simple engine.
It is perfect physics but it makes the character go up and down. (It does:
Forever
_____
if not touching green
change y by -5
________
_____
if touching green
change y by 10
________


Any alternatives or fix's?

Offline

 

#2 2010-05-15 05:23:41

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: Any ideas

Try making the number under "if touching green" smaller... that way, it wouldn't jump up so much... and under "if not touching green", you can make the number smaller, but it will also make it fall slower...  hmm


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

#3 2010-05-15 05:25:40

weissjd
Scratcher
Registered: 2007-05-16
Posts: 64

Re: Any ideas

What do you want it to do when it touches green? You could make it stop by using a variable (you could call it Velocity) and setting to zero when touching green:

set Velocity to -5
Forever
  if touching green
    change y by 10
    set Velocity to 0
  change y by velocity

You could also make it change direction by using a variable:

set Velocity to -5
Forever
  if touching green
    set Velocity to 10
  change y by velocity

If you're looking to do something else, let us know.

Offline

 

#4 2010-05-15 05:57:06

teguki
Scratcher
Registered: 2008-03-06
Posts: 72

Re: Any ideas

If I'm understanding what you want it to do correctly -move down whenever it's not touching green- then the "go up" part is unnecessary; try removing it.

Offline

 

#5 2010-05-15 08:51:58

freddythef
Scratcher
Registered: 2010-04-30
Posts: 25

Re: Any ideas

@teguki. It will fall down the ground.

Offline

 

#6 2010-05-15 08:56:12

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: Any ideas

Move the if touching green up and change it to 5 instead of 10


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

Board footer