How to interpolate scale using expression

sinbotsinbot Member Posts: 232
edited February 2019 in Working with GS (Mac)

I would like to make an actor grow in size gradually over 2 seconds. I want to do this by using interpolation to increase the scale using an expression. Unfortunately I am bunk with expressions. Can someone suggest a working expression to make the actor expand to 3x its size??

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Hi, here is a sample of I think what you are asking for. The white square uses a set size and target size (25 pixels and 75 pixels) to start at and grow too. For the blue one you can change the actor size to anything you want and it will always grow to 3 times that size. Check it out and let me know if you have any questions.

  • RowdyPantsRowdyPants Member Posts: 465
    edited February 2019

    @sinbot Since Jamie showed how to size here's another spin on his example using only variables (no hard coded numbers). Advantage of variables (attributes in GS terms) is that you only have to change them in one place (setting the attribute itself) and then all the behaviors that use that attribute will be correct.

  • sinbotsinbot Member Posts: 232

    Thank you so much both of you! Going to check these out in the morning : )

  • sinbotsinbot Member Posts: 232

    Works perfect. Funny how I thought I would need an expression for the interpolation lol. Sometimes the obvious escapes me.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    There are usually multiple ways of doing something, no worries. :)

Sign In or Register to comment.