How to create a condition based on the amount a sprite is scaled?

I have a mechanic for my game where the main character can get bigger multiple times, or smaller multiple times.
I got it working, getting bigger or smaller, but I can’t figure out how how to stop it from getting too big or too small.

I want to create a condition that says that at a certain size the player trying to make the sprite bigger or smaller won’t do anything to the size of the sprite.
Currently the method I’m using is scale by 1.5 or .5 each time. Is there a way to say something like “at 10px by 10px (or some other size) it won’t trigger the scale action and for as it gets larger say that if the size is greater than 100x100px it won’t get larger”?

Thanks!

In the event where you increase the size of the Player, check if the scale of the Player is less than some number
image
image
then increase size

Use the function “Compare 2 numbers”, using the sprite width or height as one parameter, and the number as the other.

@Mixem, that’s scale. The op was talking about image size (in pixels) after scaling - an image that is 50x50 with a scale of 100 will balloon to an image sized 5000x5000

Thank you @Muzan it only took 2 tries to figure out a scale number that worked perfectly!

Thank you @MrMen I only asked for px size because I didn’t assume there was a way to do it with scale. Even though I was able to get it to work with comparing the scale, I also tried what you mentioned, but couldn’t figure it out because I’ve never used compare 2 numbers before. How would I tell it to compare actual px size? There will be times where that will likely be a better option than scale, although I’m very happy with how it is working with scale right now.

image

A picture paints a thousand words - I hope this is enough to explain it :slight_smile:

So the player width number is automatically in pixels?
If so, then this all makes sense.

Thanks again!