changing the size from bottom...
S888RAM
LondonMember, PRO Posts: 41
Hey all,
I wanted to scale the actor using change size. First of all I ahve realized I need to do width and height separately. Can I do them in one action?
Also the actor tend to expand from the center point but I am trying to get it to expand from the bottom. Is there any way around it?
Comments
Interpolate the actor's size and position so that it changes from its starting size/position to your target size/position.
Thanks. Also is it possible to change the width and height in one go?
You can use the change size behaviour for that.
I have never once used the change size behaviour in a real project. I really, really should. I honestly don't remember now why I avoided it, and then it became habit. The silly things we do.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@socks Yes but when I choose self.size it has x and y!
well basically I am trying to make a balloon that expands with each press. But I dont want the position of whole of the balloon to change. I want it to expand from that point rather than the balloon to expand from the center if it makes sense...
The same here, I never use it, I don't like the lack of controls, just having a value slider feels clumsy and imprecise (even if it's not), you can of course wrap it in rules to make it arrive at certain values and so on, but I still prefer the control Interpolate gives you.
I have a deep mistrust of interpolate, too. I might do some experiments and see which is more precise and reliable.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@S888RAM -- To grow from the bottom of the actor you would need to do something like the following:
1) In the actor , make a self attribute (type = real) called "bottomY"
2 When time to expand the actor use the following actions/behaviors:
I'm not sure I understand, you asked if you could change both dimensions in 'one go' ? You can do that with change size, change size doesn't give you individual access to X and Y sizes.
Then you must move the position of the balloon !
An object that increases in size while its base remains in one position means that its centre point is moving, GameSalad locates an object by the objects centre, so you will need to move the object to have it grow from a point other than its centre.
Example: https://www.mediafire.com/?lbw0sl1tpapbjzc
You guys rock! yeah totally forgot about change size and I was trying to do it through the attribiutes.
@Socks thats exactly what I wanted. I guess I have not yet understood the main funcionality of the constrain. Could you explain it a bit..
Many thanks
Ok, now I am really confused ! You wrote in your OP: "I wanted to scale the actor using change size" . . . . ?
Not sure what to say about it other than it constrains things to whatever value you place in the 'To' field.
So for instance you could constrain the colour of an actor to its rotation, so when you rotate the actor it becomes more yellow (or whatever) . . . or constrain the volume of your music to the horizontal position of an actor, so as you move the actor left and right the volume goes up and down (Hey presto ! A volume slider !! ) . . . . or constrain the size of an actor to its vertical position, so it shrinks as it falls (or rises) . . . and so on.
For example, you could constrain the opacity of your balloon image to its size, so as it grows it becomes more transparent, like a real balloon becomes a little more transparent (see through) when it stretches to its limits.
@socks hahaha yeah that was just a coincidence!
And reagarding the constrains must say it was the best explaination ever! you rock * (1/0)
Lol, I though I was going mad