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

#1 2013-04-07 15:20:57

PaulBrownMagic
New Scratcher
Registered: 2013-04-05
Posts: 15

Sprite Perimeter

I'm working on a project that's got a character running around a maze, because the character isn't circular when it it turned it can overlap a "wall" that it whouldn't be able to touch and then it goes all glitchy! To solve it I added a thin circle around the character that's similar to the background colour. Now it works perfectly. Is there a way though to define a sprites perimeter so I can tell it that the character is a circle whilst the costume doesn't show it?

Thanks! You can see the project here:

http://scratch.mit.edu/projects/PaulBrownMagic/3241283

If you put the monkey over a lighter background area you'll see the extra circle in the costume. It's that circle I'd like to make invisible!

Offline

 

#2 2013-04-09 08:21:40

Imaginos
New Scratcher
Registered: 2013-03-06
Posts: 56

Re: Sprite Perimeter

I think the answer is probably to create a circular sprite and then apply the ghost attribute to it. "Ghost" makes the sprite invisible just like "hide" but it's colours are still detectable by Scratch so you can use it for colour collision detection. Then all you have to do is link this "ghost" sprite's movements to the movements of your visible sprite.

Offline

 

#3 2013-04-09 09:57:14

PaulBrownMagic
New Scratcher
Registered: 2013-04-05
Posts: 15

Re: Sprite Perimeter

Genius! Cheers Imaginos.

Offline

 

#4 2013-04-09 10:42:51

PaulBrownMagic
New Scratcher
Registered: 2013-04-05
Posts: 15

Re: Sprite Perimeter

Tried it out and it's all working brilliantly! Uploaded the revised version.

Offline

 

#5 2013-04-10 02:39:55

Imaginos
New Scratcher
Registered: 2013-03-06
Posts: 56

Re: Sprite Perimeter

Cool. I'm glad that I was able to help.

Offline

 

Board footer