Discuss Scratch

NixV
Scratcher
45 posts

Sprite Length and Width?

Is there a variable for the length and width of a sprite?
mstone326
Scratcher
1000+ posts

Sprite Length and Width?

You could create one for the width and height of a sprite. But your sprites would have to be consistent in size. What are you trying to use those variables for? However, Scratch will not assign a sprites width and height to a variable on its own.
NixV
Scratcher
45 posts

Sprite Length and Width?

mstone326 wrote:

You could create one for the width and height of a sprite. But your sprites would have to be consistent in size. What are you trying to use those variables for? However, Scratch will not assign a sprites width and height to a variable on its own.
To make positioning them easier. I dont exactly NEED to have those variables, but it would be helpful and more efficient
mstone326
Scratcher
1000+ posts

Sprite Length and Width?

Are you using tiles to create your levels or what ever you are creating? Scratch has no way of assigning a sprite's width and height unless the user does so. If you go to the sprite editor the sprite width and height are displayed. If they are all the same, much like using tiles, then you can certainly create variables for width and height and set them to their values and position them.

Edit:
If you look at this quick project you'll see that most of the sprite1 costumes are 128x128. If your costumes are of same size then it will help. In this some are different and require and offset to place properly.
https://scratch.mit.edu/projects/159208476/#editor

Last edited by mstone326 (Sept. 24, 2017 02:02:51)

b_ellamy
New Scratcher
1 post

Sprite Length and Width?

my sprites are high quality and when i upload them, they turn so pixelated. what're the right dimensions for a sprite? if it's not the dimension that's the problem, then what?
deck26
Scratcher
1000+ posts

Sprite Length and Width?

b_ellamy wrote:

my sprites are high quality and when i upload them, they turn so pixelated. what're the right dimensions for a sprite? if it's not the dimension that's the problem, then what?
Please create your own topic ratheer than necroposting. I suspect this problem is down to the type of file you're saving your image in.
gamermax3
Scratcher
2 posts

Sprite Length and Width?

you can go to the sprites costume and there would be like 100x100 but its gonna be diffrent for every sprite the first number is the width the second height and then you can manualy set a variable
098765432154321
Scratcher
500+ posts

Sprite Length and Width?

b_ellamy wrote:

my sprites are high quality and when i upload them, they turn so pixelated. what're the right dimensions for a sprite? if it's not the dimension that's the problem, then what?
Make your own topic if you're looking for help with a problem instead of posting on an old one.

gamermax3 wrote:

you can go to the sprites costume and there would be like 100x100 but its gonna be diffrent for every sprite the first number is the width the second height and then you can manualy set a variable
Please don't necropost (posting on old topics, no matter if it's related to the question), it bumps unneeded topics back to page 1.
BionicBoy554
Scratcher
1000+ posts

Sprite Length and Width?

deck26 wrote:

b_ellamy wrote:

my sprites are high quality and when i upload them, they turn so pixelated. what're the right dimensions for a sprite? if it's not the dimension that's the problem, then what?
Please create your own topic ratheer than necroposting. I suspect this problem is down to the type of file you're saving your image in.
Technically that’s thread hijacking

Powered by DjangoBB