Need help with ent_blend

Posted By: LawnmowerMan

Need help with ent_blend - 03/18/11 22:02

I want to make a nice transition between stand and walk animation. Here is my code:

Code:
function player_animations(){
	my.animation %= 100;
	if (my.animation < 0) { my.animation += 100; }
	
	if (my.state_player == stand) {
		my.animation += 2 * time_step;
		ent_animate (my, "stand", my.animation, ANM_CYCLE);
	} 
	if (my.state_player == run) {
		my.animation += 8.4 * time_step;
		ent_animate (my, "walk", my.animation, ANM_CYCLE); 
	}
}



What should I do? I know I need to use ent_blend but I do not know how to implement this in my code. Some help please
Posted By: 3run

Re: Need help with ent_blend - 03/19/11 15:57

Why not ent_blendframe? I'm not sure if it works with C-SCRIPT, but I think it should.
Posted By: LawnmowerMan

Re: Need help with ent_blend - 03/19/11 18:26

Hi 3run. No, ent_blendframe is only for LC.

I'm really stuck with this. Any help plese...
Posted By: 3run

Re: Need help with ent_blend - 03/19/11 18:31

Then I can't help dude.. I only can advice you to change to LITE-C, it's really same, but faster and in some ways easier...
Posted By: LawnmowerMan

Re: Need help with ent_blend - 03/19/11 18:43

Maybe in the future, but for now just _____C-SCRIPT RULE!!!____ grin
Posted By: 3run

Re: Need help with ent_blend - 03/19/11 18:45

No it doesn't grin If you were using LITE-C, I could give you simple state machine for animations with blending wink
Posted By: LawnmowerMan

Re: Need help with ent_blend - 03/19/11 18:50

Thank you 3run but my game is written in C-Script, for now I still do not plan to switch to LC until I finish the current game.
Posted By: 3run

Re: Need help with ent_blend - 03/19/11 18:52

OK, but hey dude, if you'll need help with migration into LITE-C, feel free to ask laugh
If you'll want to, I'll even will help you to migrate your current project too.
© 2023 lite-C Forums