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.

Dark GDK / Animation

Author
Message
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 3rd Oct 2006 00:36
Hi everybody, I need to an object play an animation then after the animation has been completed I need to play a video, problem is that I can't do it cause I dont know when the object animation stops, the wonder would be when the object reaches the last frame then I can safelly play the video...I used this but it doesn't work, cause I don't know when the object animation stops!?

jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 3rd Oct 2006 06:45
It looks to me as if you are always playing an animation, because you do not check to see if the death animation is playing at the top of the snippet, so...dbObjectPlaying will always return TRUE. Your animation system is stuck in the death animation.
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 3rd Oct 2006 18:33
So you're saying that I need to place the dbObjectPlaying before the if? problem is that my character is allready looping an animation for instance like running..
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 4th Oct 2006 03:26
Problem solved I used dbAnimationPlaying, problem was that I couldn't see the video cause It was allways rebooting
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 4th Oct 2006 05:02
That is what I meant, but...not rebooting. Just restarting the death animation every frame. When you enter the section that starts out..."if (death)", you should check to see if a death animation is already playing. (Because you just started one last frame, for example.) That will solve the current problem, but...a very useful bit of information to have at times like this is: which animation is supposed to be playing? It would be a very good idea if you saved that in the structure that you are using for each model. (Intelligent data works better than intelligent code, imo.) Then, when you check to see if an animation is playing, and you know that death was the last one you started...then it is easy to see that the animation that just stopped...was the death animation, and the state of the machine is probably...respawn, or whatever you want to follow the death.

This trouble is about state machine management. It is not so straightforward to us because...the computer can pump out frames faster than we can ever create them in our minds.

Login to post a reply

Server time is: 2024-11-19 08:26:05
Your offset time is: 2024-11-19 08:26:05