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

#1 2009-04-17 19:59:46

Generalflood
Scratcher
Registered: 2009-04-17
Posts: 4

How do you make something follow something else in scratch?

How do you make something follow something else in scratch?
I'm trying to get something to move with and point in the same way as another one of my sprites, but I've got no idea how, anyone know?

Offline

 

#2 2009-04-17 20:13:13

demosthenes
Retired Community Moderator
Registered: 2008-02-19
Posts: 1000+

Re: How do you make something follow something else in scratch?

<when green flag clicked>
<forever>
<if> <( <distance to[ person being followed]  <<> 15 )>
<point towards( person being followed)
<move( 10 or whatever amount you want )steps>
<end>
<end>

Last edited by demosthenes (2009-04-17 20:13:23)


I've taken a long hiatus, but I still visit sometimes. Give me some time to answer any messages you post on my projects!

Offline

 

#3 2009-04-17 20:15:06

DsGameMaker
Scratcher
Registered: 2009-04-14
Posts: 89

Re: How do you make something follow something else in scratch?

demosthenes wrote:

<when green flag clicked>
<forever>
<if> <( <distance to[ person being followed]  <<> 15 )>
<point towards( person being followed)
<move( 10 or whatever amount you want )steps>
<end>
<end>

Exactly what demosthenes said.

Offline

 

#4 2009-04-17 20:30:24

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: How do you make something follow something else in scratch?

Yea. Unless you want Like a turreted cannon on like a take and it always points towards mouse-pointer then it would be:

[blocks]
<when green flag clicked>
<forever>
<go to[ Sprite ]>
<point towards( Mouse-pointer )>
<end>
[/blocks]

Offline

 

#5 2009-04-18 01:44:06

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

Re: How do you make something follow something else in scratch?

and for a better looking effect

<when green flag clicked>
<forever>
<point towards( sprite/mouse
<move( ((<distance to[ sprite/mouse  </> 10 )) )steps>
<end>

Offline

 

Board footer