Jump to content
  • Advertisement
Sign in to follow this  
BUnzaga

Combat animation and reaction....?

This topic is 3721 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

I am working on a basic single player rpg, and need some help figuring out the timing between playing an attack animation and the take damage animation. As it stands my system uses something like an action que. So if player1 was attacking player2, it would something like: actionQue.add(new attack[0](player1, player2)); This obviously creates a new attack[0] object which begins the attack[0] animation for player1. Now what I am having a hard time with, is how do I determine when the player2 decides to play the 'gotHit' animation. Do I just look at the 2 second animation and figure out that at about 1.3 seconds into the animation, if the player2 got hit, then to play the 'gotHit' animation? Or is there a more desireable way to code this? What about the whole sound sequence? I would probably determine if the attack landed or not, then play either a 'squish' or 'ching' or 'woosh' sound depending on what happened, but how would I time this with my 'gotHit' 'blocked' or 'missed' animaitons? It doesn't seem very effecient to me to have to tailor these times specifically to each animaiton and attack. There has to be a more generic way to accomplish the effect.

Share this post


Link to post
Share on other sites
Advertisement
In our game, we basicly use a fancy tool to mock up timelines for each animation. The timelines have events on them at specific times, and sounds are triggered
off that. Likewise damage checks are triggered off the timeline, and if the damage function returns that it hit something a new sound is triggered then, and the target sent into it's "Get Hit" animation. It is all tied to the animations, nothing "generic" about it.

Share this post


Link to post
Share on other sites
Ahh ok, that was a simple enough concept. :p

I think I can do something like that in the program I am using too, so this is a great way to do it.

So in the end, it is pretty much tailored to the animation, for each animation. Thanks for the help.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!