Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Stuck animations

Author
Message
Dr BOK
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 26th Apr 2003 00:33
I was trying to put together some code for a model to walk, but it keeps playing the first frame of the walk animation rather than going through the whole thing. At the moment I have this:


I know something needs to be done to it, but I tried using while loops and adding variables to try and make stuff like "only play the animation while moving=1" for example. But, Im stumped. I would appreciate some help with this. Cheers
CompuWiz
22
Years of Service
User Offline
Joined: 21st Nov 2002
Location:
Posted: 26th Apr 2003 04:53
What happens is your model plays until the last frame, then continues to play the last frame over and over. There are two things you can do:
1)

What that is saying is when the upkey is being pushed, loop the object. But if it is not being pushed, stop the object from playing.

2)

What that does is it just plays the object normally, then checks to see if the animation is at the last frame. If it is, then it it sets the frames back to 0.
Good luck!

The only way to prevent all lag in a game is not to make the game.
Dr BOK
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 26th Apr 2003 16:59
Thans for your help mate

Login to post a reply

Server time is: 2024-11-24 12:40:38
Your offset time is: 2024-11-24 12:40:38