one time animation in .md2 and .ms3d

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
wornaki
Posts: 54
Joined: Sat Aug 23, 2003 1:18 am
Location: Argentina, South America

one time animation in .md2 and .ms3d

Post by wornaki »

Is there a way to play an animation (let's say wave from the sydeny model) once only (without loop)? I've searchesd the docs for a while and couldn't find anything. All examples I can gather loop the animation but there is none which play an animation once only (returning to idle afterwards).
If someone could point me my error, omision or whatever please do. If this feature isn't implemented I will need it soon so I'd better ask for it.
Cheers and thanks
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Post by Robomaniac »

Try setMD2Animation in your IAnimatedMeshSceneNode. Maybe that will work, i'm no expert though.

[edit] -- Also, you could have a loop like

Code: Select all

int startFrame; //your first frame number
int  currFrame; //current frame
int finalFrame; //your final frame number

startFrame = 8; //first frame of animation
currFrame = startFrame; //set current frame to the start

//loop through the animation until it is finished
while(currframe < y)
{
    node->setCurrentFrame(currframe);
    currframe++;
}

...just a thought [/edit]
--The Robomaniac
wornaki
Posts: 54
Joined: Sat Aug 23, 2003 1:18 am
Location: Argentina, South America

Post by wornaki »

I've already tried that :( :roll:. It didn't work
Guest

Post by Guest »

Robomaniac: what is i in the while code?. I tried everything but your example didn't work. Thanks anyway, It was woth trying.
Now I think I'll have to tell NIko about it...
Guest

Post by Guest »

I think the i (or y) in his while-loop is the finalFrame...
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Post by Robomaniac »

yeah, sorry, the y should be finalFrame
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

It does seem like something that should have a "Repeat" flag like the createFlyStraightAnimator and possibly a isReady() function like FadeInOut.
Crud, how do I do this again?
wornaki
Posts: 54
Joined: Sat Aug 23, 2003 1:18 am
Location: Argentina, South America

Post by wornaki »

yeah, something like you said saigumi would be absolutely great. Hope Niko makes it in a realease soon.
Post Reply