How do I return the number of animation frames?

Just started using Construct 2? Post your questions here

Post » Tue Oct 11, 2016 1:14 pm

How do I get the number of animation frames of a sprite when it is not the default animation frames? I have a sprite with two sets of animation frames. I need to retrieve the number of animation frames in the second set not the first set.
B
6
S
1
Posts: 3
Reputation: 356

Post » Tue Oct 11, 2016 3:52 pm

The expression Sprite.AnimationFrameCount.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Oct 21, 2016 6:46 am

I have 2 animation for 1 sprite. I want to know how to return the count of the second animation, not the first. The expression Sprite.AnimationFrameCount returns the the number of frames of the 1st animation.
B
6
S
1
Posts: 3
Reputation: 356

Post » Fri Oct 21, 2016 7:24 am

Set the animation temporally to the second animation. Store count in a local. Set it back.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests