Is there a way to count number of animations for a sprite?

0 favourites
  • 3 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • I know there is a AnimationFrameCount to count the number of frames in an animation but I didn't see anything like AnimationCount to count the number of different animations in a Sprite. Is there any other way to detect this? Or the amount of animations in a animation sub-folder?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I guess you would have to count it manually. I can't really think of a use for being able to know the number of animations when your game is running.

  • I was actually trying to help someone else answer a question for choosing a random animation. If there was a count expression you could simply do Play Animation: "Animation"&ceil(random(0, AnimationCount)) and name them Animation1, Animation2, etc.

    Yes, it is not that useful, as opposed to just counting yourself, but I always appreciate it when setup to avoid manual input and oversight, when adding/removing animations in this case.

    More specifically was thinking Idle animations so add a folder for all the Idle animations and name them Idle1, Idle2, etc and find a way to do a count for the animations in that folder

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)