shrink and then grow PROBLEM! NEED HELP!!

yunxhinyunxhin Member Posts: 14
edited November -1 in Working with GS (Mac)
I have an actor, if I touch it, the actor will shrink and then grow back to original size.
How can I do this? I have done it with change size behavior,
but when the actor shrink and then I touch it again,
it will shrink more before it back to the original size.
I'm really frustrate...

Thanks for anyone who can help.

Comments

  • calvin9403calvin9403 Member Posts: 3,186
    make an attribute int 0 name it shrink
    when touch is an d attribute shrink is 0
    change size
    change attribute to 1

    timer after 0.5 sec(depend on how long would the actor become the normal size), change attribute shrink to 1

    __________________________________________________________
    http://www.gamesaladforum.com/
  • LumpAppsLumpApps Member Posts: 2,881
    You can use interpolate instead of change if you want it 'animated'.
    Interpolate self.sizex to "a" in "0.5" sec
    Interpolate self.sizey to "b" in "0.5" sec
    Rule when self.size x = "a"
    Interpolate self.sizex to "original size" in "0.5" sec
    Interpolate self.sizey to "original size" in "0.5" sec
  • yunxhinyunxhin Member Posts: 14
    thanks for your feedback.
    I try using your rule.
    but after I touch it, the actor shrink and then it won't stop grow.
    I did change the attribute back to 0.
  • calvin9403calvin9403 Member Posts: 3,186
    then try to use interpolate look lud says, it is very useful

    ________________________________________________
    http://www.gamesaladforum.com/
  • LumpAppsLumpApps Member Posts: 2,881
    Look lug is like Lud I suppose. Empty your mouth before you speak. ;)
  • yunxhinyunxhin Member Posts: 14
    LudwigHeijden said:
    You can use interpolate instead of change if you want it 'animated'.
    Interpolate self.sizex to "a" in "0.5" sec
    Interpolate self.sizey to "b" in "0.5" sec
    Rule when self.size x = "a"
    Interpolate self.sizex to "original size" in "0.5" sec
    Interpolate self.sizey to "original size" in "0.5" sec

    Thanks for your feedback.
    I'm using interpolate and yet it got what I want.
    But when when I do multiple touch to the actor, it stuck in the current size.
    Just like lag. How can I fix this?
  • calvin9403calvin9403 Member Posts: 3,186
    LudwigHeijden said:
    Look lug is like Lud I suppose. Empty your mouth before you speak. ;)

    sorry , I change it
  • calvin9403calvin9403 Member Posts: 3,186
  • CapCap Member Posts: 225
    @ tshirtbooth:

    I don't know for sure, but isn't there a problem with collide when you use interpolate to change the actor size?
    I thought I read some months ago that you should use the change attribute when it comes to the size of an actor if you want the collision area to change to that size, too. Or am I wrong?
  • kapserkapser Member Posts: 458
    I don<t know about interpolate, but change size have been working in my game.
Sign In or Register to comment.