How do you bonce off the color black?
Offline
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
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)
Offline
you have to have a move x steps for that to work.
thats how i made metal gear ninja's bounce system
Offline
Put a
Wait until not touching black
block after the direction block, or you will get stuck.
Offline
thanks : )
Offline
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
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.
Offline
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/371970I know that now, this topic is over a year old.
oops... didint cheak the date. some1 else bumped it thou, spammer
Offline