How to expand and reduce an actor?

ocindahouseocindahouse Member Posts: 24
edited November -1 in Working with GS (Mac)
I have a 32x32 actor that goes from point a to point b in 1.1 second, I want that actor in that same 1 second to expand to 64x64 and then go back to 32x32. I can't figure it out.
I tried making timers:

after 0.1 change attribute self.width and self.height to 38.4
after 0.1 change attribute self.width and self.height to 44.8
after 0.1 change attribute self.width and self.height to 51.2
after 0.1 change attribute self.width and self.height to 57.6
after 0.1 change attribute self.width and self.height to 64
after 0.1 change attribute self.width and self.height to 57.6
after 0.1 change attribute self.width and self.height to 51.2
after 0.1 change attribute self.width and self.height to 44.8
after 0.1 change attribute self.width and self.height to 38.4
after 0.1 change attribute self.width and self.height to 32

This obviously don't work, it just moves in the direction i set for it but does not change the size at all. Can somebody tell me what i'm doing wrong?

Thank you

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    hey there

    use interpolate.

    Interpolate self size width and interpolate self size height to 64, with a duration of 0.5

    Then have a rule when attribute. self.size.width = 64,
    -interpolate self size width and height to 32
  • ocindahouseocindahouse Member Posts: 24
    Worked great, thanks a million
Sign In or Register to comment.