Actor shrinking

bds62bds62 Member Posts: 31
edited February 2014 in Working with GS (Mac)
Hey all,

So I have an actor I want him to shrink to be able to fit under a platform to collect a coin. This will be achievable by pressing the down key. Then when the key is not pressed (up) he will return to normal size.

In my key down press rule I had change size with a function of self.size.height-5 When I previewed and performed the action my character stayed the same size but shot up and flew off screen, odd.

So I switched the Change Size behavior to Change Attribute self.size.height-5. While this worked, it didn't shrink the image (a ball) so the top part became flat. Also if I held the down key it would continue on until the image is gone (don't have a return to size when key is released put in yet).

During my research on youtube and in the forms I found a video of a guy changing size via buttons that are on screen through game attribute but they continued to shrink until he'd hit + button the same amount of times he pressed - to stop it... No bueno...

I came across this post on the forums http://forums.gamesalad.com/discussion/23825/shrink-and-then-grow-problem-need-help and liked the animation effect of the @LudwigHeijden response using interpolate.

But using interpolate with self.size.height-5 it continues shrinking until it disappears. AND still flattens the top.

So, is there a way to change size of the actor without the image being cropped? Also, is there a way to make a set size to go to?
It's size is 50X50. I need it to go to 45x45 without cropping image. I tried setting self.size.height45 and nothing happened and also tried self.size.height45px and nothing happened.

I'm feeling this can all be achieved fairly easy and I'm just not seeing it.

Comments

Sign In or Register to comment.