How do I animate sprite cursor is over

Get help using Construct 2

Post » Sat Nov 12, 2016 8:25 pm

I want to animate an icon when the cursor is over it. But it does not perform the animation, when placing the cursor on the sprite it changes animation but it stops and does not execute the loop.

Animation changes, but does not loop.

Image
Hi I am Samuel :)

My google play
B
42
S
10
G
1
Posts: 126
Reputation: 3,278

Post » Sat Nov 12, 2016 8:29 pm

You need to set the animation itself to loop in the animation settings within the image editor. This will just set the animation to play, whatever its settings are, which are probably the default ones where it plays once.
B
46
S
16
G
78
Posts: 2,168
Reputation: 46,353

Post » Sat Nov 12, 2016 8:45 pm

plinkie wrote:You need to set the animation itself to loop in the animation settings within the image editor. This will just set the animation to play, whatever its settings are, which are probably the default ones where it plays once.


In the image settings everything is correct. The speed is at 9 and the loop is set to yes.

Image
Hi I am Samuel :)

My google play
B
42
S
10
G
1
Posts: 126
Reputation: 3,278

Post » Sat Nov 12, 2016 9:18 pm

I've had a look at this. Because you're using a family you need to make sure that all of the animations are looping on all of the objects in the family, or I guess that particular object you are hovering over. Are they all identical? Even though the logic applies to all objects in the family, the animations will still be considered separate for each object.
B
46
S
16
G
78
Posts: 2,168
Reputation: 46,353

Post » Sat Nov 12, 2016 10:10 pm

plinkie wrote:I've had a look at this. Because you're using a family you need to make sure that all of the animations are looping on all of the objects in the family, or I guess that particular object you are hovering over. Are they all identical? Even though the logic applies to all objects in the family, the animations will still be considered separate for each object.


Yes, everyone has the same loop animation, although they change the speed and amount of sprites.
Hi I am Samuel :)

My google play
B
42
S
10
G
1
Posts: 126
Reputation: 3,278

Post » Sat Nov 12, 2016 10:14 pm

Is there some other logic that changes their animation? Other than that don't think I can help. Although I would say is there a need for a check if an animation is playing, can you not just have cursor over object set animation?
B
46
S
16
G
78
Posts: 2,168
Reputation: 46,353

Post » Sat Nov 12, 2016 10:20 pm

No, the logic of the printscreen is the only one I use on those buttons. I really think it might be some bug. But before anything else I'll just create a capx with this functionality. I'll post it as soon as I do.
Thank you for your attention. :D :D :D :D
Hi I am Samuel :)

My google play
B
42
S
10
G
1
Posts: 126
Reputation: 3,278

Post » Sat Nov 12, 2016 10:41 pm

You dont want to change the animation for every member of the group every tick, mouse over it or not.
That logic is flawed and a bit slow.

Rather do this:

https://www.dropbox.com/s/v6n920bg2sos1 ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Nov 13, 2016 5:16 pm

99Instances2Go wrote:You dont want to change the animation for every member of the group every tick, mouse over it or not.
That logic is flawed and a bit slow.

Rather do this:

https://www.dropbox.com/s/v6n920bg2sos1 ... .capx?dl=0


It really is some conflict in my game. But I can not find it. :cry: :cry:

Thank you for your help.
Hi I am Samuel :)

My google play
B
42
S
10
G
1
Posts: 126
Reputation: 3,278

Post » Sun Nov 13, 2016 5:27 pm

99Instances2Go wrote:You dont want to change the animation for every member of the group every tick, mouse over it or not.
That logic is flawed and a bit slow.

Rather do this:

https://www.dropbox.com/s/v6n920bg2sos1 ... .capx?dl=0



Discovered. The screen with the animation is a layer that stays on the game when I finish a phase. I put the time scale to 0 for the game to pause.

Now I do not know how I will solve this. :/
Hi I am Samuel :)

My google play
B
42
S
10
G
1
Posts: 126
Reputation: 3,278

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests