[Solved]How to animate an animation

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
zooks97
Prole
Posts: 11
Joined: Wed Jan 01, 2014 6:22 pm
Location: United States

[Solved]How to animate an animation

Post by zooks97 »

For my character's walking animation I need to be able to move the eye blinking animation for each frame of the walking animation (the walking animation has four frames but I only need two frames of moving the eyes((x, y), (x, y-1), looping). The delay for the blinking eyes is not in sync with the delay walking animation, so making another animation for the eyes is out of the picture. In short, I need the eye animation to "stick" with the head bobbing. I'm using AnAL for the animations. Thanks :nyu:.
.love Download

You can see the difference in this video:
Last edited by zooks97 on Sat Jan 04, 2014 4:01 pm, edited 1 time in total.
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: How to animate an animation

Post by micha »

After updating the animation, get the frame number of the body. And then in the draw-function set the offset for drawing the eyes depending on the current frame of the body.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests