Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

DuncanBojangles

The "OpenGL Game Progamming" Book MD2 animation

This topic is 5559 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I''m still faithfully working on my pogo stick game and I have implemented collision detection, world lloading, character loading, and all that fun stuff. Making the trick animations look good is very difficult, but that is off topic. What I really need to know is how to stop the animation once it has completed one cycle. I am using the MD2 milkshape model class from the book "OpenGL Game Programming" because my own format was good, but I had no way to make the models other than by hand. What I''m having a problem with is that when I animate a trick, it keeps running the animation over and over. I''ve tried to change the class code so it runs once then stops, but I can''t get it to work right and it crashes my program. Could anyone help me with this? Oh, I just remembered, is there any way I can implement a static data member in a class without compiling errors? Thanks in advance. "Donkey, if it were me, you''d be dead." I cna ytpe 300 wrods pre mniute.

Share this post


Link to post
Share on other sites
Advertisement
Cant help you with you stick..

but for the Static member the trick is this:


xyz.h

class xyz
{
static int frame;
};

xyz.cpp
int xyz::frame = 0 ;


you migth be able to have the part i put in the .cpp fil in the headder file ( but outside the class ) however my compiler doesn''t like that...



/Please excuse my bad spelling - My native language is binary not english
|Visit me
\Take my advice - I don''''t use it...

Share this post


Link to post
Share on other sites
I''m replying to my own message so it will get to the top of the list and someone might just happen to know something. I''ll only do this once and I hate to do it, but I really need some help with this. I''ve gotten it to stop animating once the initial animation is done but I cannot reset it so I may animate it once more. Sorry to get in the important people''s way.

"Donkey, if it were me, you''d be dead."
I cna ytpe 300 wrods pre mniute.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!