Hey Everyone

I've modified the Improved Player Movement from the wiki with a 3rd person camera. Because of that, I need my player to have animations when walking/running/jumping.

Running the animation for walking/running is no problem, but I'm really struggling to get the animation to play correctly when jumping.

Right now, if you press key_space, it begins the animation, but then stops. The jump continues, but with the walking animation (or standing animation, whichever is appropriate).

I'm using STATES for the animation. I've been reading a lot of tutorials, and the manual. I think it might be because of the ANM_CYCLE mode, as the manual says it's for "Cyclic animation scene, like walking or running. Otherwise it's a noncyclic scene like jumping or shooting."

So is there another mode that would play the entire jump animation cycle? If I just remove ANM_CYCLE, I get an error. Is there a noncyclic mode?

Here's my jump STATE code:

Code:
if(key_space == 1)
		{my.STATE = 3;}
		if (my.STATE ==3)
		{
			var height = (key_space)*15*time_step;
			my.ANIMATION += 1*height;
			ent_animate(me,"jump",my.ANIMATION,ANM_CYCLE);
		
			if(grounddist-minv(movedir.z*time_step, grounddist) == 0)
			{
				//jump
				if(key_space)
				{
					movedir.z = -jumpacc;
				}
			}
		}



Any help would be greatly appreciated!

Emo


"To one who has faith, no explanation is necessary. To one without faith, no explanation is possible." - St. Thomas Aquinas