Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
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.
The expression Sprite.AnimationFrameCount.
Develop games in your browser. Powerful, performant & highly capable.
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.
Set the animation temporally to the second animation. Store count in a local. Set it back.