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

#1 2007-12-12 18:10:04

Drag0nSlay3r
Scratcher
Registered: 2007-11-22
Posts: 4

Argh stuck!

Well I'm just wondering how you could do a certain movement with a sprite.

For instance if I have a sprite that moves around the screen but when it touches this other sprite it bounces off and moves in the other direction.

Any help will be greatly appreciated.

P.S. A similar movement to the "if on edge bounce" but I need a "if touching sprite bounce and move in opposite direction."

Offline

 

#2 2007-12-13 01:47:25

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Argh stuck!

Hi Drag0nSlay3r,

you can try something like this:

[blocks]
<if><touching[ other sprite
<point in direction( (( <direction> <-> 180 ))
<end>
[/blocks]

Does that answer your question?


Jens Mönig

Offline

 

#3 2007-12-14 10:34:23

Drag0nSlay3r
Scratcher
Registered: 2007-11-22
Posts: 4

Re: Argh stuck!

Yes it does, thanks.

Offline

 

Board footer