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

#1 2008-03-16 11:50:51

Kittyofdoom
Scratcher
Registered: 2008-03-16
Posts: 28

Bounce back, black!

How do you bonce off the color black?


<applet id='ProjectApplet' style='display:block' code='ScratchApplet' codebase='http://scratch.mit.edu/static/misc' archive='ScratchApplet.jar' height='387' width='482'><param name='project' value='../../static/projects/Kittyofdoom/139310.sb'></applet> <a href='http://scratch.mit.edu/projects/Kittyofdoom/139310'>Learn more about this project</a>

Offline

 

#2 2008-03-16 14:45:23

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Bounce back, black!

How you bounce depends on how you move.  There are several standard ways to move around in scratch, and each results in a different way of bouncing.

Offline

 

#3 2008-03-18 20:46:44

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: Bounce back, black!

The best way is   [blocks]<point in direction( (( 180 <-> <direction> ))[/blocks], because most ways use that, even though not many people know about it.

Under the sprite that's supposed to bounce, put this script in:

<when green flag clicked>
<forever>
  <if><touching color[ black
   <point in direction( (( 180 <-> <direction> ))
  <end>
<end>
That *should* work.

Last edited by hmnwilson (2008-03-18 20:47:16)


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#4 2008-03-18 20:50:25

ZenBuddhistDog
Scratcher
Registered: 2008-03-18
Posts: 9

Re: Bounce back, black!

you have to have a move x steps for that to work.
thats how i made metal gear ninja's bounce system


i am BuddhistDog. i was FPSFelix, but i changed to my email.

Offline

 

#5 2008-03-19 02:37:39

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Bounce back, black!

Put a
Wait until not touching black

block after the direction block, or you will get stuck.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#6 2008-04-20 11:08:36

Kittyofdoom
Scratcher
Registered: 2008-03-16
Posts: 28

Re: Bounce back, black!

thanks : )


<applet id='ProjectApplet' style='display:block' code='ScratchApplet' codebase='http://scratch.mit.edu/static/misc' archive='ScratchApplet.jar' height='387' width='482'><param name='project' value='../../static/projects/Kittyofdoom/139310.sb'></applet> <a href='http://scratch.mit.edu/projects/Kittyofdoom/139310'>Learn more about this project</a>

Offline

 

#7 2009-03-23 11:14:18

tomerpet
Scratcher
Registered: 2009-03-23
Posts: 1

Re: Bounce back, black!

<think[  ]for(  )secs><think[  ]for(  )secs><think[  ]for(  )secs><think[  ]for(  )secs><switch to costume[

Offline

 

#8 2009-03-23 14:06:24

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Bounce back, black!

hmnwilson wrote:

The best way is   [blocks]<point in direction( (( 180 <-> <direction> ))[/blocks], because most ways use that, even though not many people know about it.

Under the sprite that's supposed to bounce, put this script in:

<when green flag clicked>
<forever>
  <if><touching color[ black
   <point in direction( (( 180 <-> <direction> ))
  <end>
<end>
That *should* work.

its not as easy as that! that only works for up and down movement. I made a project with full bouncing ability:
http://scratch.mit.edu/projects/yambanshee/371970

Offline

 

#9 2009-03-23 14:20:51

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: Bounce back, black!

yambanshee wrote:

hmnwilson wrote:

The best way is   [blocks]<point in direction( (( 180 <-> <direction> ))[/blocks], because most ways use that, even though not many people know about it.

Under the sprite that's supposed to bounce, put this script in:

<when green flag clicked>
<forever>
  <if><touching color[ black
   <point in direction( (( 180 <-> <direction> ))
  <end>
<end>
[/blocks]That *should* work.

its not as easy as that! that only works for up and down movement. I made a project with full bouncing ability:
http://scratch.mit.edu/projects/yambanshee/371970

I know that now, this topic is over a year old.


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#10 2009-03-23 14:23:46

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Bounce back, black!

hmnwilson wrote:

yambanshee wrote:

hmnwilson wrote:

The best way is   [blocks]<point in direction( (( 180 <-> <direction> ))[/blocks], because most ways use that, even though not many people know about it.

Under the sprite that's supposed to bounce, put this script in:

<when green flag clicked>
<forever>
  <if><touching color[ black
   <point in direction( (( 180 <-> <direction> ))
  <end>
<end>
[/blocks]That *should* work.

its not as easy as that! that only works for up and down movement. I made a project with full bouncing ability:
http://scratch.mit.edu/projects/yambanshee/371970

I know that now, this topic is over a year old.

oops... didint cheak the date. some1 else bumped it thou, spammer  hmm

Offline

 

Board footer