Jump to content

Animations not ending at the same time


lilsheep
 Share

Recommended Posts

I have three animations playing simulatenously

  • a player
  • a helmet
  • a dagger

It seems like the player ends last (you can see the flicker in the gif I posted)

 

        if (this.equipped.weapon) {
            this.weaponAnimation.attacking.gotoAndPlay(0);
        }
        if (this.equipped.helmet) {
            this.helmetAnimation.attacking.gotoAndPlay(0);
        }
        this.baseAnimation.attacking.gotoAndPlay(0);

 

my code for making the animation visible is currently extremely naive but shouldn't be an issue

every update call it checks the state and depending on the state it will display the animation (so they should all stop at the same time):

if (this.unitState.currentState === 'attacking') {
            this.baseAnimation.attacking.visible = true;
            this.weaponAnimation.attacking.visible = true;
            this.helmetAnimation.attacking.visible = true;
        }

 

each animation is the same amount of frames with the same animationSpeed.

 

Why is there this flicker! Also the sprite sheet is tiny and I use scaling.

Help!

output.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...