How to make image come upside gradually?

gawakamygawakamy Member Posts: 109
edited April 2012 in Working with GS (Mac)
Hi, GS dudes.
I am gonna make some images come upside from the bottom of the screen gradually.
This is what I have made.

When an event is happened.
Change image
Change Attribute self.Position.X to 160
Change Attribute self.Position.Y to self.Position+.5
Change Attribute self.Position.Y to 160

However, it doesn't work. Help me please.
Thanks :D

Best Answers

  • scitunesscitunes Posts: 4,047
    Accepted Answer
    Change attribute only fires once unless you wrap it in a timer. Use interpolate.

    So when even happens
    change attribute self.positionX to 160
    interpolate self.positionY to 160
  • FViMaginationFViMagination Posts: 89
    Accepted Answer
    hi gawakamy,
    If I understood what you did, maybe you can try with Interpolate behavior, giving some time to your Actor to come upside, according to how long or short you want your Actor to move upside.
    Something like this:

    Rule: (your event)
    ____
    Interpolate Attribute: self.Position.X to 160
    Duration: 0.3 (if you need your Actor to go to PosX 160 quickly)
    ____
    Interpolate Attribute: self.Position.Y to 160
    Duration: 1 (or try some other number until you get satisfied by the movement of your Actor)

    hope this helps
    cheers!

Answers

  • gawakamygawakamy Member Posts: 109
    @francyfranchini Thanks, for your help. It really work well. But there is another problem. I am gonna change the images whenever the event is happened. And the images are duplicated. How can I explain. Hmm... ok. My original idea is to display only one image each. But there is a same image on the image. How do I figure it out?
Sign In or Register to comment.