animating modle added from WED

Posted By: Hani

animating modle added from WED - 03/13/08 14:23

hi,
i'm useing the engine SDK.
i have a modle added in WED, it has animation clips . by defult the modle play all its animation clips ,
i want the modle to play a certain animation , this is my code :

Code:
 
ENTITY * MyPlayer;
MyPlayer= ent_for_name("Fighter_mdl_030");
if (MyPlayer)
{
MyPlayer->emask |= DYNAMIC;
}

while (engine_frame())
{
ent_animate(MyPlayer,"Walk",_VAR(10) , ANM_CYCLE);
MyPlayer->pan += _VAR(1);
}



the problem is that the entity don't play the walk animation (its there , and the spilling is right)

now if i created the same model uing the ent_create()

MyPlayer = ent_create(...) insted of MyPlayer = ent_for_name("fighter_mdl_030");
everything work just fine,
so is there any special way to handle entities added in WED regarding animation?

by the way , i've tried it in script , eveything went fine , this proble appear only in higher language
Posted By: xXxGuitar511

Re: animating modle added from WED - 03/13/08 14:29

ent_animate(MyPlayer,"Walk",_VAR(10) , ANM_CYCLE);

...Well, it certainly doesn't help if you feed the function a fixed value for the frame cycle - "_VAR(10)"

This number is supposed to be a percentage of the cycle
Posted By: LarryLaffer

Re: animating modle added from WED - 03/16/08 09:33

I'm having the same problem. I'm only using lite-c, but i want to call entities using ent_for_name and not having to assign any actions in WED. It all works fine, but because the engine cycles all animations by default to entities with no actions attached in wed, u can imagine the problem when i try to animate with ent_animate as well. I'll post about this in the Beta section, asking that dynamic entities(my.emask &= ~DYNAMIC;) would not animate by default like this..
Posted By: Hani

Re: animating modle added from WED - 03/16/08 10:18

[xXxDisciple ]
yes it dose, cause that mean "keep the entity animated at that persentage"
© 2023 lite-C Forums