For that you better use ent_blendpose. It allows to blend between any number of animation poses. So what you do is simply setting the entities pose parameter to 2, animate the "aim up" part of it, then set the pose parameter to 3, animate the "aim down", then do a ent_blendpose of pose 2 and 3 by 50 percent and finally copy the pose into pose 1 to make it visible.
Something like this:

Code:
function entityAim(ENTITY* ent, var percent)
{
        my = ent;
	
	my.pose = 2;
	ent_animate(my,"aimUp",100,ANM_CYCLE);
	
	my.pose = 3;
	ent_animate(my,"aimDown",100,ANM_CYCLE);
	
	ent_blendpose(my,2,3,percent);
	ent_blendpose(my,1,2,100);
	

}



Now, if you call this function with a percent value of 50, you should have the straight aiming, if you call it with a percent value of zero you should have aiming up, and with a percent value of 100 aiming down. Any values between these will result in interpolations.
However, this is just typed out of nothing, not sure if it works flawlessly. And of course you still have to calculate the percent from somewhere else, and if you wanna have additive animations (to do this while the entity is standing, running, walking, whatever) you'd have to add that. However, this is the rough idea how it could work.

EDIT: oh, and this only works with bones as far as I recall, however I guess you're using bones anyways.

Last edited by the_clown; 06/26/12 08:33.