Ask here your questions to get help using GDevelop.
By komencanto
#43953 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.
By komencanto
#43977 Thanks!
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?
User avatar
By 4ian
#43978 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.
User avatar
By Darkhog
#43980
Lizard-13 wrote:
Code: Select all40*1 / 55

Why are you multiplying by 1? I'm not Einstein, but I do know that multiplying something by 1 doesn't change it.
User avatar
By 4ian
#43991 Because of:

From the rule of three


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. :)
By komencanto
#43995
4ian wrote: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.

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?
User avatar
By Lizard-13
#43997
But the default size shall be that which is in the Properties of the object

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 :?

the original size of the object's sprite in pixels is not shown in its Properties

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)
User avatar
By ricardograca
#44125 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?