Discuss Scratch

Giddy215
Scratcher
7 posts

Invisible Costumes and Pen Drawing

I've found that when you delete everything in a costume in the paint editor, and then try to draw, say, ellipses with that sprite, weird stuff starts happening. Here's a project to illustrate.

I think it would make sense to be able to use non-existant costumes if you want, even though you can just hide a sprite.

Last edited by Giddy215 (May 15, 2013 14:07:38)

Kinderlabor
Scratcher
51 posts

Invisible Costumes and Pen Drawing

Here is another example for the empty costume bug: http://scratch.mit.edu/projects/10032852/
DadOfMrLog
Scratcher
1000+ posts

Invisible Costumes and Pen Drawing

I think it only happens if you have an empty costume that *used to be* not empty - i.e. you've deleted everything it had.

The problem is related to Scratch's preventing of sprites going off-screen, and it seems to get a bit confused about where the centre of the sprite is relative to the (lack-of-)drawing once you delete everything.

It's not really a problem to sort out, since it seems to be fine for a costume that's empty as it's first created - i.e. you CAN use an empty costume for pen drawing just by creating a new costume - just as long as you never put anything in it which you then delete…


Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

DadOfMrLog
Scratcher
1000+ posts

Invisible Costumes and Pen Drawing

Ah, yes, and I'll bet the problem is because a costume, when first created, is given pixel dimensions of 1x1, even though it contains nothing.
But then once you delete everything in the costume it becomes 0x0.

Division by zero there somewhere ST,,,?



Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

Kinderlabor
Scratcher
51 posts

Invisible Costumes and Pen Drawing

Thanks for the insight, DadOfMrLog! I can confirm that using a newly created empty costume in http://scratch.mit.edu/projects/10032852/ makes the problem go away.

Powered by DjangoBB