Scaling sprites, how?

I have a sprite 55x55 pixels. In the game I want it to be 40x40. How to adjust its size? In the properties of the sprite I put its size to 40x40 but when I create it in the game it has its original size 55x55.

After creating the object, with the scale action, set:

scale =  0.73

From the rule of three:

40*1 / 55

So, as I understood, the size in the Properties of the object works only for objects which were put in the scene before running the program. If you create the object using an event editor, an original sprite size is used for it, which is kind of weird… A bug, maybe?

Objects are of course created using their default size (there are no reason to create them with a particular size).
You have to use the “scale” actions to resize them for now.

Why are you multiplying by 1? I’m not Einstein, but I do know that multiplying something by 1 doesn’t change it.

Because of:

It’s not necessary of course (and will be optimized out), but letting this 1 can make clearer to the reader that we apply a simple proportionality ratio. :slight_smile:

But the default size shall be that which is in the Properties of the object. If not, why there is a “custom size” of the object available? Besides, the original size of the object’s sprite in pixels is not shown in its Properties (Width/Height of the object = 0 and shown in gray color). It’s much more convenient to set the size of it in pixels in Properties or using “scale” action, I think. And you do just that when you put objects on the scene by hand, so why it shall work different when you put them there using Events?

You can’t set the sprite size in the object properties, but in the instance properties… I mean, you can set the default size of each instance added in the scene. AFAIK, in the objects properties (general/default object properties) you can only set variables and automatisms :confused:

I think would be a good idea to view the image size somewhere, sometimes I have to search the image to view properties or add the action to write the image size in a variable and check it in the debugger (it is not a hard work, but a size displayer could help)

Hi folks!
I’ve tried to use “scaling” dinamically, and I could not find a way to do that.

Let me explain: Let’s supose I have a character in a specific shot in a scene, and then I move it to another place in the same scene, but to give the impression of distance, this character should be smaller; so… can I have this kind of effect dinamically?

How about this:
When you move Player up it’s getting smaller, when you move Player down it’s getting bigger.

1 Like

Hi Komencanto!
Greate solution! Thanks!