forward animation on rollover, play backwards rolloff?

Get help using Construct 2

Post » Wed May 27, 2015 5:41 pm

Thinking about button effects and wondered if there was an easy way to play an animation forward when the mouse or something is overlapping and then when it leaves the overlapped area the animation plays backwards to stop at the original frame.

Think of a flower blooming on rollover and then when the mouse leaves the flower curls back up in to a bud..

thank you!!
B
4
Posts: 22
Reputation: 244

Post » Wed May 27, 2015 5:48 pm

I don't know if it can be done like you want to, playing the animation forward and then backward. You can however create two animations using the same frames. One animation for the flower opening and another one for the flower closing.
Then whenever the player interacts with the flower overlapping it or not you just change the animation it should be playing.
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Wed May 27, 2015 6:09 pm

RayKi wrote:I don't know if it can be done like you want to, playing the animation forward and then backward. You can however create two animations using the same frames. One animation for the flower opening and another one for the flower closing.
Then whenever the player interacts with the flower overlapping it or not you just change the animation it should be playing.


Awesome idea! I still don't get how I'd make the 2nd animation play if the overlapping sprite leaves the active area though..

I might play with boolean instance variables or something for "on/off" switches in the animation functions.. never thought of that.
B
4
Posts: 22
Reputation: 244

Post » Wed May 27, 2015 6:12 pm

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 27, 2015 6:25 pm

Message: Rollendice is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
LittleStain wrote:something like this?


I'll have to check this out when I get back on my production computer. You wouldn't happen to have a demo would you? :P
B
4
Posts: 22
Reputation: 244

Post » Wed May 27, 2015 6:28 pm

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 27, 2015 6:39 pm

Message: Rollendice is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
LittleStain wrote:


AWESOME!
I'll have to take a look at the events later but this is what I'm after.

Thank you!
B
4
Posts: 22
Reputation: 244

Post » Wed May 27, 2015 8:13 pm

here you go its a 400 kb capx cause of the images i used are pretty big in weight, but all depends on your png, jpeg, it can be used on any object as long as you have animation frames, works on mobile also
Download


image1 image2


also for more cool stuff if you need check this forum topic i madehere , and scirra tutorials section fromhere!
B
78
S
23
G
69
Posts: 1,353
Reputation: 44,005


Return to How do I....?

Who is online

Users browsing this forum: Lancifer and 23 guests