Gradually getting bigger actor?
http_gamesalad
Member Posts: 1,340
How can I make an actor grow in size gradually?
How can I make an actor grow in size gradually?
Comments
Interpolate self . height and self. Width to an integer you want. Set duration with an integer for seconds
Or change size behavior
Or constrain size to self.time.
@Socks - so elegant, I love it.
@socks how would I do constrain size to self.time.?!
Constrain size.width to self.time
Constrain size.height to self.time
@socks what if I use the change size behavior? What if I wanted to change it from 120 by 120 to 600 by 600?
Cause the "Constrain size.width to self.time
Constrain size.height to self.time" didnt work
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'.
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.
Thanks for the feedback.
@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 ?
@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
".. & 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.
When the interpolation starts sometimes the acceleration stops until the actor is done interpolating @socks
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
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.
@socks
Looks like a rule to interpolate something after 0.1 seconds ? Looks fine to me.
@socks is there a way to get that gradually growing effect without using the interpolate behavior?
@AwesomelyB do you know if there is a way to stop it once it reaches a certain size (example: 600 px by 600 px)
& is there a to make the actor expand within 6 seconds? @sock @AwesomelyB
Please bare with me ! Thank you for all your help so far
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.
"is there a [way] to make the actor expand within 6 seconds?"
Interpolating its size over 6 seconds would be the most straightforward way.
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