How do I loop animation?

Get help using Construct 2

Post » Sat Apr 23, 2016 9:15 am

I've just created my first game, it works pretty well. 4 levels, and stuffs. But the problem is, I can't loop the animation! It looks bad without the animation looping! Please help :(
B
5
Posts: 15
Reputation: 255

Post » Sat Apr 23, 2016 9:24 am

Insert this in your event editor:

*Sprite - On Any Animation Finished
--------->Sprite -> Play From "Beginning"

or If you have a specific Animation Name for example called "Idle"

*Sprite - On Animation FInished ("Idle")
--------->Sprite -> Set Animation "Idle" From "Beginning"
Image



The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
55
S
17
G
90
Posts: 1,112
Reputation: 59,147

Post » Sat Apr 23, 2016 12:33 pm

chadorireborn wrote:Insert this in your event editor:

*Sprite - On Any Animation Finished
--------->Sprite -> Play From "Beginning"

or If you have a specific Animation Name for example called "Idle"

*Sprite - On Animation FInished ("Idle")
--------->Sprite -> Set Animation "Idle" From "Beginning"


This is what I do in my Event Sheet :

KeyBoard - On Left Arrow Pressed - "Set animation to "Walk" (play from beginning)
"Set Mirrored"

KeyBoard - On Left Arrow Released - "Stop loop"
"Set animation to "Idle" (From beginning)
"Set not mirrored"
"Set mirrored"

Is this correct?
B
5
Posts: 15
Reputation: 255

Post » Sat Apr 23, 2016 12:54 pm

@Ericpro06 - Use this, your events above have conflicts:

*KeyBoard - On Left Arrow Pressed -
-----> Sprite --> "Set animation to "Walk" (play from beginning)
-----> Sprite --> "Set Mirrored"

*KeyBoard - On RIght Arrow Pressed
-----> Sprite --> "Set animation to "Walk" (play from beginning)
-----> Sprite --> "Set Not Mirrored"

*KeyBoard - Left arrow is down(Inverted) & Right arrow is down(Inverted)
-----> Sprite --> "Set Animation to "Idle" (play from beginning)

Tell me if there is something wrong because I haven't tested it but it should work.
Image



The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
55
S
17
G
90
Posts: 1,112
Reputation: 59,147

Post » Sat Apr 23, 2016 6:47 pm

why not just set the setting in the sprite animation of the Idle animation to loop ?
B
51
S
24
G
6
Posts: 391
Reputation: 7,820


Return to How do I....?

Who is online

Users browsing this forum: jkmalau, MoscowModder, terence951, vegapomme27 and 9 guests