Page 1 of 1

Animated .gif's - advice needed!

PostPosted: Sun Feb 03, 2008 11:50 am
by kevwalker23
Hi everyone.
I've finally mastered changing an actor's animation and movement depending on the direction from the main actor (e.g. an enemy moving towards the main actor, with the animation changing as the angle of approach changes) using the following:-

angle = direction (x, y, maincharacter.x, maincharacter.y);
directional_velocity = 4.5;
animpos = ((angle / 360) * nframes)-1;

The enemy actor has 32 frames, and the correct frame displays when angles/directions change. However, as the enemy 'walks' I'm trying (and failing!) to have each of the 32 frames as animated gif's (each an 8-frame animation of 'walking')
When I try this, though, the animation frames, though rotating correctly, are not themselves animated.
Anyone help?

Re: Animated .gif's - advice needed!

PostPosted: Sun Feb 03, 2008 11:53 pm
by DilloDude
What you need to do is either have 32 animations of eight frames, eight animations of 32 frames, or one combination animation. I prefer the second method, but it depends on the number of frames. Each animation should be the whole rotation of one frame of walking. Name the animations something simple like "0", "1", through to "7". Then set it up in draw actor so the animation changes when walking.

Re: Animated .gif's - advice needed!

PostPosted: Mon Feb 11, 2008 2:37 pm
by kevwalker23
I've tried just about every combination, still no success. The probelm seems to be that when animated .gif's are put together as part of a GE multiple file animation, they don't individually animate (though they do when used as single files). The GE animation is spot on for the direction, but the movement itself is not animated.
Can anyone show me an example of this in action to see if I can spot what I'm doing wrong?

Re: Animated .gif's - advice needed!

PostPosted: Mon Feb 11, 2008 9:03 pm
by DilloDude
Take a look at this demo. Just click and hold to walk to the mouse.