Gradually getting bigger actor?

How can I make an actor grow in size gradually?

Comments

  • DaftbombDaftbomb Member Posts: 36

    Interpolate self . height and self. Width to an integer you want. Set duration with an integer for seconds

  • zweg25zweg25 Member Posts: 738

    Or change size behavior

  • SocksSocks London, UK.Member Posts: 12,822

    Or constrain size to self.time.

  • DaftbombDaftbomb Member Posts: 36

    @Socks - so elegant, I love it.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @socks how would I do constrain size to self.time.?!

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2015

    @http_gamesalad said:
    socks how would I do constrain size to self.time.?!

    Constrain size.width to self.time
    Constrain size.height to self.time

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @socks what if I use the change size behavior? What if I wanted to change it from 120 by 120 to 600 by 600?

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    Cause the "Constrain size.width to self.time
    Constrain size.height to self.time" didnt work :/

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2015

    @http_gamesalad said:
    socks what if I use the change size behavior?

    Is the question what happens if you use the change size behaviour ? The change size behaviour changes the size of your actor at the speed defined by the 'growth rate'.

    @http_gamesalad said:
    What if I wanted to change it from 120 by 120 to 600 by 600?

    I'd use change attribute if you just want to change something to a specific size. Or if you want to gradually change from one size to another you could use Interpolate.

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2015

    @http_gamesalad said:
    Cause the "Constrain size.width to self.time
    Constrain size.height to self.time" didnt work :/

    Thanks for the feedback.

    ;)

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @socks the interpolation works BUT I have the actor moving at 270.. & then the moving stops for it to interpulate

  • SocksSocks London, UK.Member Posts: 12,822

    @http_gamesalad said:
    socks the interpolation works BUT I have the actor moving at 270.. & then the moving stops for it to interpulate

    What does moving at 270 mean ?

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @socks Accelerate in the direction: 270 with Acceleration of 200

  • SocksSocks London, UK.Member Posts: 12,822

    @http_gamesalad said:
    socks Accelerate in the direction: 270 with Acceleration of 200

    Sorry, but none of this makes any sense to me, maybe I'm not understanding you properly. You say . . .

    "the interpolation works BUT I have the actor moving at 270"

    . . . I'm not sure why you've put the word 'but' in the middle of that sentence, to me it reads like this: the fridge works just fine BUT I have some new brown shoes :smile:

    ".. & then the moving stops for it to interpulate"

    Don't know what that means either, it's not even clear (to me at least) whether you are saying what happens at the moment or what you want to happen.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited March 2015

    When the interpolation starts sometimes the acceleration stops until the actor is done interpolating @socks

  • AwesomelyBAwesomelyB Master of Extra Terrestrial Pixels Purple Pixel PlanetMember Posts: 23

    Whenever I make any of my actors rotate gradually or anything like that I just do this:
    "Timer [Every] {0.1} Seconds:"
    "Change Attribute {self.Width} to {self.Width + 1}"
    "Change Attribute {self.Height} to {self.Height + 1}"

    I hope that works :)

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2015

    @http_gamesalad said:
    When the interpolation starts sometimes the acceleration stops until the actor is done interpolating socks

    It's hard to say what is causing your issue without knowing anything about how your code is set up . . . but you can accelerate an actor whilst interpolating its size . . . then again you can also constrain an actor's size to self.time but you say that doesn't work too . . . so not sure what to suggest to be honest, not showing your actual code and responding with 'doesn't work' kind of limits the conversation, but maybe try @AwesomelyB's suggestion above, hopefully it will work for you.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2015

    @http_gamesalad said:
    socks

    Looks like a rule to interpolate something after 0.1 seconds ? Looks fine to me.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @socks is there a way to get that gradually growing effect without using the interpolate behavior? :)

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @AwesomelyB do you know if there is a way to stop it once it reaches a certain size (example: 600 px by 600 px)

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    & is there a to make the actor expand within 6 seconds? @sock @AwesomelyB

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    Please bare with me :) ! Thank you for all your help so far

  • SocksSocks London, UK.Member Posts: 12,822

    @http_gamesalad said:
    socks is there a way to get that gradually growing effect without using the interpolate behavior? :)

    The interpolate behaviour works just fine with accelerate - and so does constraining the actor's size to self.time, but you could also try using change size.

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2015

    "is there a [way] to make the actor expand within 6 seconds?"

    Interpolating its size over 6 seconds would be the most straightforward way.

  • AwesomelyBAwesomelyB Master of Extra Terrestrial Pixels Purple Pixel PlanetMember Posts: 23

    @http_gamesalad said:
    & is there a to make the actor expand within 6 seconds? sock AwesomelyB

    I would do it as follows (I tested this and it worked):
    Timer: For "6" seconds
    Timer: Every "0.01" seconds
    Change Attribute: self.Size.Width to self.Size.Width+1
    Change Attribute: self.Size.Height to self.Size.Height+1

Sign In or Register to comment.