Animated .gif's - advice needed!

Non-platform specific questions.

Animated .gif's - advice needed!

Postby kevwalker23 » Sun Feb 03, 2008 11:50 am

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?
kevwalker23
 
Posts: 5
Joined: Fri Sep 03, 2004 8:21 pm
Score: 0 Give a positive score

Re: Animated .gif's - advice needed!

Postby DilloDude » Sun Feb 03, 2008 11:53 pm

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.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Re: Animated .gif's - advice needed!

Postby kevwalker23 » Mon Feb 11, 2008 2:37 pm

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?
kevwalker23
 
Posts: 5
Joined: Fri Sep 03, 2004 8:21 pm
Score: 0 Give a positive score

Re: Animated .gif's - advice needed!

Postby DilloDude » Mon Feb 11, 2008 9:03 pm

Take a look at this demo. Just click and hold to walk to the mouse.
Attachments
Multi-FrameDemo.zip
(32.23 KiB) Downloaded 94 times
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron