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

#1 2010-06-23 17:58:43

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

I have a problem...

I want to make a sprite go to the edge of another sprite, like a real (distance to sprite [sprite1 v]) block. How would this be accomplished?


http://i46.tinypic.com/dw7zft.png

Offline

 

#2 2010-06-24 04:16:00

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: I have a problem...

[point towards[sprite]]
[go to[sprite]]
repeat until not<touching[sprite]?>]
[move (-1) steps]
end repeat.

if the sprite you want to touch the edge of is a cirle of known width, you can get it to move radius*-1 steps.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#3 2010-06-24 07:47:54

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: I have a problem...

sparks wrote:

[point towards[sprite]]
[go to[sprite]]
repeat until not<touching[sprite]?>]
[move (-1) steps]
end repeat.

if the sprite you want to touch the edge of is a cirle of known width, you can get it to move radius*-1 steps.

That WOULD work, but I need it to move fast... Plus, it uses pen.


http://i46.tinypic.com/dw7zft.png

Offline

 

#4 2010-06-24 09:53:41

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: I have a problem...

What shape is the sprite?


nXIII

Offline

 

#5 2010-06-24 09:59:57

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: I have a problem...

Something like this:
   /\
/    \
|_|_|


http://i46.tinypic.com/dw7zft.png

Offline

 

#6 2010-06-24 10:09:03

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: I have a problem...

SeptimusHeap wrote:

Something like this:
   /\
/    \
|_|_|

um... could you upload the image?


nXIII

Offline

 

#7 2010-06-24 10:18:23

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: I have a problem...

Well, it's basically a triangle shape, with two rectangles

______
|_| |_|

sticking out the back.


http://i46.tinypic.com/dw7zft.png

Offline

 

#8 2010-06-24 17:11:30

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

Re: I have a problem...

SeptimusHeap wrote:

Well, it's basically a triangle shape, with two rectangles

______
|_| |_|

sticking out the back.

a crude rocket?


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#9 2010-06-24 17:21:35

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: I have a problem...

cds56 wrote:

SeptimusHeap wrote:

Well, it's basically a triangle shape, with two rectangles

______
|_| |_|

sticking out the back.

a crude rocket?

Sorta. Just a triangle with thrusters.


http://i46.tinypic.com/dw7zft.png

Offline

 

#10 2010-06-26 08:36:32

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: I have a problem...

When one panther team member writes something the others are not far behind  smile


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#11 2010-06-26 09:05:33

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: I have a problem...

lol, I guess they do what I do, scan the topics that might interest them by who last commented or created the topic  tongue


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#12 2010-06-26 11:16:06

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: I have a problem...

sparks wrote:

lol, I guess they do what I do, scan the topics that might interest them by who last commented or created the topic  tongue

I just open every single "blue" thread in a new tab and read them all...


nXIII

Offline

 

#13 2010-06-26 13:42:37

Subh
Scratcher
Registered: 2010-05-25
Posts: 100+

Re: I have a problem...

me too.

Your answer: Simply find out the distance between the Centre(x and y position) and the edge.


http://wiki.scratch.mit.edu/skins/scratch/logo.png     I'M IN Scratch Wiki .... ARE YOU ????

Offline

 

Board footer