Help Unit 3-Animations


I have a student working on code. He wants part of the basketball court as a background, but when he codes it in (even adjusting the x, y, w, h), it only takes up a small portion of the screen.

Thoughts? Thanks!

I’m pretty sure I know what’s happening. You’re setting the width of the sprite to 800, but when you assign the animation to court that width property the student has set it ignored and reset. What you should do is this:
court.scale = 2;
this will make the court bigger. If you need it even bigger just set court.scale to something higher, for example 3, or if it’s too big set it to something lower.

1 Like

@mcmastersha, I believe @IMPixel is correct. For whatever reason, the animation replaces the width and height parameters and reverts to the size of the animation. The scale block would be a good option. If you don’t assign an animation, it will use the width and height parameter to appropriately size the sprite (in this case, a gray rectangle).


1 Like