make sprite SIZE= sprite size*2

How do you do that with an expression?

You have an operator to change object size (sprite>size>scale)
but when you like to use the current size inside an expression, there is no “scale”. Instead you have scale of width and scale of height.

How do you do a unified scale with one block of code? :smiley:

You can store an objects sprite size in a variable and whenever you change the sprite size, also update that variable and vice versa. That’s how I’ve been dealing with this anyway and it works.

Hi,
This fix seems to work. Thank you!

It would be nice to have scale in the expressions too. I wonder why it’s not there.

another question:

Is there a LERP function for the expressions or something like it?
I need to gradually change a value to another value with an expression. How do you do that in GD?

a+(b-a)*x

but I’ll probably add this function to the next version :slight_smile:

sweet :smiley:

this next version is really something. Really looking forward to it!

btw what does a, b and x stand for?
a-current value, b- changed value, x - speed of transition?

Do I need to multiply the speed of transition by dt?