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

#1 2013-02-09 15:48:05

thing2731
New Scratcher
Registered: 2013-02-09
Posts: 3

Moving Sprite

How do you move one of your sprites halfway to another sprite?

Offline

 

#2 2013-02-09 15:59:17

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Moving Sprite

either do

point towards [ sprite 2 v]
move ((distance to [sprite 2 v]) / 2)
or
set x to ((x position) + ([x position v] of [sprite 2]) /2)
set y to ((y position) + ([y position v] of [sprite 2]) /2)

Offline

 

#3 2013-02-09 16:02:20

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Moving Sprite

sorry that the scratchblocks didn't work but you can probably work out what it was meant to be.

Offline

 

#4 2013-02-09 16:04:24

thing2731
New Scratcher
Registered: 2013-02-09
Posts: 3

Re: Moving Sprite

Not a problem, thank you shadowmouse!  smile

Offline

 

#5 2013-02-11 16:17:54

thing2731
New Scratcher
Registered: 2013-02-09
Posts: 3

Re: Moving Sprite

Does anyone have any other ideas, I need to find as many ways as possible for a school project...

Offline

 

#6 2013-02-11 16:30:52

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Moving Sprite

A slight variation on my second

change x by ((([x position v] of [Sprite 2 v]) - (x position)) / (2) )
change y by ((([y position v] of [Sprite 2 v]) - (y position)) / (2) )

Offline

 

Board footer